News for hackers. Stuff that matters.
Re:Is .NET just miles ahead or am I delusional? by ludston on Saturday April 13, 2024 @06:44AM (#40022073)
Miles ahead of what? There is a reason that we write javascript in the browser and operating systems in c or c++, and telco services in erlang, and academic works in python rather than in C# or F#.

.Net is the best at being .Net I guess. It has loads of libraries that are both good and terrible. I think the .Net web ecosystem is a god-awful mess of magic DSL's and configuration, and more and more sugar syntax is being added to C# to make it harder and harder to on-board new developers, and .Net Core deciding to break backwards compatibility is probably costing my org 10's of millions of dollars. But I guess I don't need to type as much as I did 10 years ago.

Re:Is .NET just miles ahead or am I delusional? by addicted on Saturday April 13, 2024 @07:07AM (#40022202)
We write JavaScript in a browser because of a historical quirk and literally no other reason. There are 0 ways in which JavaScript is the most suitable choice for the browser other than Netscape wanted their own new scripting language really fast and JS was what Eich could come up with in a couple of weeks.

We write operating systems in C because it’s a thin veneer over assembly and coding in assembly is really hard. We use C++ instead of other languages because of its C interop.

Erlang is a really good fit for concurrency so that’s one of the few languages that’s used where it is for its technical merits.

Python is used for academic work solely because it’s easy to learn and easy to get started with so a lot of colleges used python to teach engineers/scientists programming. Python became the language of academia because that’s what the people in academia knew. If colleges had adopted Ruby or Lia for their Programming for non CS majors 101 classes instead, Lua or Ruby would be the language of academia.

Re:Is .NET just miles ahead or am I delusional? by tomrod on Saturday April 13, 2024 @08:09AM (#40022620)
I'd argue the REPL paradigm and readability are why R and Python are dominant in academics. Compilation and/or object oriented and functional paradigms are hard to teach someone who just learned how a text editor is distinguished from Microsoft Word.
Re:Is .NET just miles ahead or am I delusional? by afiori on Saturday April 13, 2024 @08:18AM (#40022660)
In my opinion more than being easy to read the advantage of python is that it allows for very ergonomic APIs in libraries.
Re:Is .NET just miles ahead or am I delusional? by tomrod on Saturday April 13, 2024 @12:37PM (#40024242)
I think that's is the sticking feature for devs. Having straddled both SWE and Data Science, data scientists and other academically aligned start in the REPL (or notebooks).
Re:Is .NET just miles ahead or am I delusional? by bradleyjg on Saturday April 13, 2024 @07:25AM (#40022340)
it’s easy to learn and easy to get started with

Don’t disagree with a lot of the rest of your post, but this is a real, genuine virtue and ought not to be lightly dismissed.

Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @07:39AM (#40022413)
Python is not fundamentally any easier to use or to learn than something like Haskell or Clojure or Racket or Scheme (I'd argue the contrary) though. It's only true in practice out of sociohistorical accident, because your colleagues can show you how to use it to do things, because their colleagues once showed them.
Re:Is .NET just miles ahead or am I delusional? by lpapez on Saturday April 13, 2024 @07:51AM (#40022494)
This is just an absurd statement, of course Python is easier to learn than either of those languages.

I've taught Haskell at an university and almost none of the students ever found the model of computation natural. I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense.

That being said, I absolutely see the value of the latter, and consider it a good thing that functional concepts are gaining popularity in imperative languages.

Re:Is .NET just miles ahead or am I delusional? by tome on Saturday April 13, 2024 @08:23AM (#40022682)
Would it be possible to give a small example of Haskell versus Python that shows why Python's model of computation is different to and easier than Haskell's?
Re:Is .NET just miles ahead or am I delusional? by homborg on Saturday April 13, 2024 @10:01AM (#40023210)
Imagine writing a cooking recipe or any kind of instructions.

They seem naturally sequential and an imperative to me.

I can't imagine how a list of instructions would be clearer in haskell.

Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @12:08PM (#40024055)
That's an argument from incredulity... https://en.wikipedia.org/wiki/Argument_from_incredulity
Re:Is .NET just miles ahead or am I delusional? by tome on Saturday April 13, 2024 @03:02PM (#40025211)
I suppose I was looking for a more typical programming example than a cooking recipe, but even so I don't see why Haskell would have a problem there. I wouldn't claim it would be clearer but I still don't see why it would be worse.

    cook meat sauce = do
       pan <- getPan
       addTo pan meat
       cookFor pan 10
       addTo pan sauce
       cookFor pan 3
       food <- contents pan
       pure food
Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @08:06PM (#40027446)
> I wouldn't claim it would be clearer

Although written in an imperative style and thus superficially similar, the haskell differs in that it is referentially transparent.

I think that makes it objectively clearer, because it implies certain guarantees that nothing will surprise the reader.

Re:Is .NET just miles ahead or am I delusional? by tome on Sunday April 14, 2024 @05:06AM (#40029807)
That's a good point! Python's weird scoping rules can make code very unclear.
Re:Is .NET just miles ahead or am I delusional? by tasuki on Saturday April 13, 2024 @03:23PM (#40025329)
Monads are exactly the mechanism for chaining instructions, how could it get any clearer than that?
Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @12:10PM (#40024070)
> I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense.

It is not at all obvious that this is truly the case. If it was the case, why didn't humans intuitively develop mathematics from a computational foundation? It took centuries before we made the leap from mathematical abstractions to Turing machines, and the two are (in some great general sense) isomorphic.

Re:Is .NET just miles ahead or am I delusional? by temporarely on Saturday April 13, 2024 @01:09PM (#40024451)
"I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense" + to perform tasks.

So, you are right regarding the mindset of human philosophers, but that is not the sort of problems OP's students were tasked with solving.

Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @02:57PM (#40025187)
I wasn't thinking about philosophers in particular, but rather about mathematicians and scientists.
Re:Is .NET just miles ahead or am I delusional? by FrustratedMonky on Saturday April 13, 2024 @07:57AM (#40022536)
I would disagree.

Javascript is as easy to learn as any language, like understanding the syntax of a loop or an if-statement.

But to do anything practical at all, I'd say you quickly bump into a jungle of libraries you need for everything, and then it is just as complicated as any other language, or more. The javascript ecosystem is a nightmare.

Re:Is .NET just miles ahead or am I delusional? by miki123211 on Saturday April 13, 2024 @11:53AM (#40023938)
Javascript doesn't have a good "starting point". Either you learn it in the browser, and then you need to learn HTML first, or you learn it in node.js, and then it's hard to get Python levels of "fun". In Python, input() is one of the first things you learn, and that actually lets you make somewhat interesting programs. Once you learn loops and conditionals, you know enough to write a "guess the number" game, which is probably the simplest actually useful program you can make. Once you learn to deal with files, you already get superpowers, you don't even need functions, classes and such for simple, text-munging scripts.

Node makes this a lot harder, the simplest way to have interactivity is the readline library, and that requires you to understand functions, closures and the idea of a callback and why one is needed.

Then there's the "R way" of learning Python, in a Jupyter notebook, by stringing functions from Numpy, Pandas, Matplotlib and perhaps some other libraries in your field together, with no understanding of what a loop is, because you don't really need those for basic dataframe and tensor work.

Re:Is .NET just miles ahead or am I delusional? by adrianmsmith on Saturday April 13, 2024 @07:23AM (#40022327)
Plus the world would probably really be a better place of operating systems etc. weren’t written in C.

Think of all the urgent iOS, Windows etc. patches which could be avoided if the software didn’t suffer from a number of classes of avoidable vulnerabilities.

Re:Is .NET just miles ahead or am I delusional? by usr1106 on Saturday April 13, 2024 @08:09AM (#40022618)
Plus the world would probably really a better place if Windows weren't one of the dominating systems, limited to desktop computing, but still...
Re:Is .NET just miles ahead or am I delusional? by imadj on Saturday April 13, 2024 @07:53AM (#40022504)
OP very clearly said:

> There is a reason that we write {...} rather than in C# or F#.

So are you arguing in favor of C#/F# here? you believe it was more suited for all of these cases? I hope not.

But again, if it's neither, then this comment seems like a out-of-context straw man.

Re:Is .NET just miles ahead or am I delusional? by IshKebab on Saturday April 13, 2024 @07:49AM (#40022473)
You're 100% right except maybe about Python. Probably the biggest reason it is used is because it actually has a REPL. You can play around easily and do things like Jupyter notebooks. That's completely unimportant for most programming but it's very useful in scientific research.

Python's REPL isn't even any good, but it does at least exist which is more than you can say for most languages.

(And there's also the fact that it's crazy popular.)

Re:Is .NET just miles ahead or am I delusional? by nopcode on Saturday April 13, 2024 @11:54AM (#40023942)
I can't think of a single language that doesn't have REPL functionality and Jupyter is literally developed by academics.
Re:Is .NET just miles ahead or am I delusional? by IshKebab on Sunday April 14, 2024 @04:02AM (#40029503)
What? Virtually no compiled language does, and even the ones that do usually have it as a massive hack (e.g. Cling).
Re:Is .NET just miles ahead or am I delusional? by miki123211 on Saturday April 13, 2024 @11:56AM (#40023953)
Python's repl is pretty average IMO, iPython is a lot better, Jupyter is best in class.

Perhaps some of the old Lisp or Smalltalk environments could rival that, but no other modern language except Julia and R, which also have Jupyter support, come even close when repl ergonomics is concerned.

Re:Is .NET just miles ahead or am I delusional? by ludston on Saturday April 13, 2024 @07:30PM (#40027164)
Yes. So you can not really argue that C# is better in the browser than javascript because unlike javascript it doesn't have native integration, or the same loads of documentation and libraries and tutorials and frameworks that are part of the JavaScript ecosystem.
Re:Is .NET just miles ahead or am I delusional? by dagaci on Saturday April 13, 2024 @07:04AM (#40022187)
I would say it’s completely ok to break backwards compatibility every 20 -30 years as is the case with .NET. Breaking compatibility to consolidate and forward past learnings and that kind of thing. The old .NET framework will be supported for many decades into the future, so it’s not necessary to upgrade if there is no benefit, for example when your customers are .NET dev’s who expect to be support with the new versions
Re:Is .NET just miles ahead or am I delusional? by FrustratedMonky on Saturday April 13, 2024 @08:03AM (#40022578)
I'm curious what a good life time length should be to be considered 'stable'.

Allowing your code base to run ok for 10 years, 20, 30 without change. You are talking Cobol type situations where the rest of the industry has moved on, and now your are stuck. So each individual has to judge jumping ship and migrating their systems.

Even Python took the leap and did a major revision that broke everything. But guess it had to be done.

Re:Is .NET just miles ahead or am I delusional? by binary132 on Saturday April 13, 2024 @08:19AM (#40022662)
The Python 3 upgrade nightmare was a big mistake. I’m not saying I know the right way, but just because they did it that way doesn’t mean they had to and should have.
Re:Is .NET just miles ahead or am I delusional? by baq on Saturday April 13, 2024 @09:57AM (#40023184)
It was, but the language as it was in 2 was reaaaaaallly not XXI-century ready.

They could ship both interpreters and communicate with RPC for all I care as long as shit still worked. Though to be fair I haven’t written a single line of Python 2 for about 10 years now.

Re:Is .NET just miles ahead or am I delusional? by bmicraft on Saturday April 13, 2024 @04:16PM (#40025694)
It did break everything, but I'd hardly call it a mistake. Python3 is more popular than its predecessor ever was. It was very painful for many people, yes, but it doesn't seem to have hurt the language much if at all.
Re:Is .NET just miles ahead or am I delusional? by binary132 on Sunday April 14, 2024 @11:30AM (#40031821)
Just because it worked out doesn’t mean it was fine and the way things should be. There are definitely better ways.
Re:Is .NET just miles ahead or am I delusional? by formerly_proven on Saturday April 13, 2024 @07:18AM (#40022283)
This doesn't sound like once every 20-30 years (.NET itself is only 22):

> We do not guarantee 100% compatibility between major versions. This is true for both ASP.NET Core and the runtime itself. We intentionally make breaking changes where we believe that they are necessary to move the platform forward and the cost of the .NET ecosystem adjusting to them is low enough.

There is a major .NET release every year. Every other release is LTS with 3 years of support.

> The old .NET framework will be supported for many decades into the future

I'd guess so but Microsoft is not as clear on this as you'd wish. In all their policy documents they say it's "supported as a Windows component on the latest required update" or "Beginning with version 4.5.2 and later, .NET Framework is defined as a component of the Windows operating system (OS). Components receive the same support as their parent products, therefore, .NET Framework 4.5.2 and later follows the lifecycle policy of the underlying Windows OS on which it is installed." To me this seems to be carefully written to allow the possibility of changing that Windows component status in a Windows release. So, .NET Framework is supported as long as it is part of Windows, until it isn't.

Re:Is .NET just miles ahead or am I delusional? by fabian2k on Saturday April 13, 2024 @07:23AM (#40022326)
There was one huge breaking change, that was the move from the Windows-only .NET Framework to the cross-platform .NET Core. I assume that is the one the parent is talking about.

The major releases of modern .NET are relatively painless now, there aren't that many breaking changes. This is pretty much the same as many other languages, and kinda unavoidable unless you go for an ecosystem that aims for very long term stability and is essentially frozen.

The early .NET Core releases had some annoying breaking changes, but it's very different today.

Re:Is .NET just miles ahead or am I delusional? by dagaci on Saturday April 13, 2024 @07:33AM (#40022387)
>>We do not guarantee 100% compatibility between major versions.

This is a true caveat for any language or framework, and is a sensible disclaimer.

But I think the author was referring to transition from “.Net Framework 4” series (since 2001 when I first used it, ~23 years ago) where Microsoft declared “.Net Framework 4.8” would be the last major version of that series. And that new developments should use the “.NET Core” series, which is now named just “.NET “.

Re:Is .NET just miles ahead or am I delusional? by Jenk on Saturday April 13, 2024 @07:24AM (#40022331)
They are _very_ averse to breaking changes, however.
Re:Is .NET just miles ahead or am I delusional? by ern on Saturday April 13, 2024 @07:27AM (#40022356)
Microsoft decided to release .NET 8 without support for InProcess Function Apps. After a few months of radio silence, they have finally acknowledged that they were working towards support at some point before .NET 6 hits end of life later this year.

I have a fairly large portfolio of legacy in-life systems that are stuck in limbo now, and a limited group of developers to move them to .NET 8.

We wont have to move them into isolated mode on short notice, to get them to .NET 8 but this isn’t the Microsoft of old, where backwards-compatibility is a paramount consideration.

Re:Is .NET just miles ahead or am I delusional? by thefz on Saturday April 13, 2024 @07:33AM (#40022383)
You can still pretty much use .NET and skip Core, so I don't get your point
Re:Is .NET just miles ahead or am I delusional? by antiframe on Saturday April 13, 2024 @07:59AM (#40022552)
That would depend on what platform you are developing on, though. I, for example, can't.
Re:Is .NET just miles ahead or am I delusional? by Xeamek on Saturday April 13, 2024 @07:01AM (#40022165)
But syntactic sugar is important though.

Arguably one of the biggest downsides of c++ is that it has tons of features without there being a syntactic sugar for using them, which in turn makes them less attractive

Re:Is .NET just miles ahead or am I delusional? by addicted on Saturday April 13, 2024 @07:11AM (#40022240)
There’s having syntactic sugar and there’s whatever the F C# is trying to do.

There is so much different syntactic sugar to do the same thing that it’s becoming very difficult to onboard new devs to any slightly complex application worked on by multiple devs because invariably the codebase will consist of 3-4 syntaxes doing the same thing which can get really hard to grok.

In an ideal world C# would have gotten rid of a lot of the ceremonial code it had but unfortunately backwards compatibility means that’s not likely to happen.

I wish C# declared a preferred singular syntax for every scenario and provided IDE support to warn when that preferred syntax wasn’t being used.

Re:Is .NET just miles ahead or am I delusional? by dagaci on Saturday April 13, 2024 @07:44AM (#40022444)
Visual Studio has build in snippets for boilerplate stuff, so you can type class[tab], ctor[tab], prop[tab] to inject a class contrutor or property into you code. Other IDEs will have similar.

Built in ones are here https://learn.microsoft.com/en-us/visualstudio/ide/visual-cs...

If you want to apply a coding style, there are lots of free tools for that even, or you could investigate something like ReSharper from jetbrains.

https://learn.microsoft.com/en-us/visualstudio/ide/code-styl...

Re:Is .NET just miles ahead or am I delusional? by cjk2 on Saturday April 13, 2024 @07:13AM (#40022253)
I said this elsewhere in the thread, but C# reminds me of The Homer now. https://simpsonswiki.com/wiki/The_Homer

No one is sure what problem it is trying to solve anymore.

Also the amount of people I see blowing their toes off by not understanding stuff like LINQ and when stuff is executed and materialised into memory is insane. That and entirely not understanding async and any weird side effects like things happening on other threads and losing context and all sorts. Urgh.

Im sure C# version 22 or whatever it's on now will allow you to write in plain English at compile time and it'll use CoPilot to compile this to C# which doesn't work.

Re:Is .NET just miles ahead or am I delusional? by christophilus on Saturday April 13, 2024 @08:00AM (#40022561)
LINQ is maybe the only thing I miss from my .NET days. But this was the biggest problem with it. It was easy for newcomers to accidentally introduce horrendous performance by failing to understand how LINQ would translate to the underlying store.
Re:Is .NET just miles ahead or am I delusional? by cjk2 on Saturday April 13, 2024 @08:02AM (#40022574)
Yeah we broke everything one day with a bad merge conflict resolution. The ToList() ended up before the Where() and after Where()!. Tests passed, integration tests worked. Until we had 2000 front end cluster threads all trying to pull a 2 billion row table.
Re:Is .NET just miles ahead or am I delusional? by bradleyjg on Saturday April 13, 2024 @07:27AM (#40022357)
There is so much different syntactic sugar to do the same thing that it’s becoming very difficult to onboard new devs to any slightly complex application worked on by multiple devs because invariably the codebase will consist of 3-4 syntaxes doing the same thing which can get really hard to grok.*

This is exactly the same story as c++. You’d think we’d learn from history.

Re:Is .NET just miles ahead or am I delusional? by PedroBatista on Saturday April 13, 2024 @09:20AM (#40022967)
If that gives you any comfort “new” Java is starting to go the same way.

Too many smart language people trying to justify their salary.

Re:Is .NET just miles ahead or am I delusional? by thefz on Saturday April 13, 2024 @07:34AM (#40022393)
> There is so much different syntactic sugar to do the same thing

Have an example of overlapping syntax?

Re:Is .NET just miles ahead or am I delusional? by ludston on Saturday April 13, 2024 @10:47AM (#40023484)
All the same:

int Foo => 4;

private int Foo { get => 4; }

private int Foo { get { return 4; } }

Re:Is .NET just miles ahead or am I delusional? by thefz on Saturday April 13, 2024 @12:02PM (#40024007)
Do these all compile to the exact same thing?

https://sharplab.io/#v2:CYLg1APgAgTAjAWAFBQMwAJboMLoN7LpHoCW...

Yes, so you are right.

I don't get why in IL, the expression bodied member is different, though. Still, makes sense if you have learned C# starting from the most verbose form (3) then (2) was introduced, then (1).

Re:Is .NET just miles ahead or am I delusional? by ludston on Saturday April 13, 2024 @07:21PM (#40027124)
I could probably give 20 different examples of this too. Not all of them would have identical compiler output, but the behaviour would be.

E.g. you could add

private int Foo { get; } = 4;

To the above example given that the behaviour is identical, although the compiled output should be different so I didn't to avoid any nit pickers.

Re:Is .NET just miles ahead or am I delusional? by masklinn on Saturday April 13, 2024 @07:05AM (#40022193)
C++ has tons of syntactic sugar, the problem is that it's largely syntactic diabetes leaving you confused and unsure about what's happening. The recent article about C++ initialisation was a good reminder.
Re:Is .NET just miles ahead or am I delusional? by thepra on Saturday April 13, 2024 @07:37AM (#40022403)
I mean, C# runs fine in the browser nowadays too, thanks to WebAssembly
Re:Is .NET just miles ahead or am I delusional? by coldtea on Saturday April 13, 2024 @06:52AM (#40022117)
>Miles ahead of what?

Miles ahead of the tooling, frameworks, and features of most languages.

>There is a reason that we write javascript in the browser

Yes, we're stuck with it.

>and operating systems in c or c++

Yes, the legacy.

>and telco services in erlang

Erlang doesn't have some particular stronghold in telco services. It was created by Ericsson for their own such use, but it's not like other/most telcos use Erlang. Ericsson itself even neglected (and for a period even banned new Erlang projects, preferring other languages).

>and academic works in python rather than in C# or F#

Huh? Who writes "academic works in Python"? I'm sure some do. Still many write Java, C#, and others, including C++ and even Haskell. Except if by "academic works" you meant "in machine learning and scientific computing", or "use as teaching language".

Re:Is .NET just miles ahead or am I delusional? by Octoth0rpe on Saturday April 13, 2024 @06:58AM (#40022142)
>>and operating systems in c or c++

> Yes, the legacy.

That's hardly the only reason, and certainly not the reason why new OSes are not written in .net languages.

Re:Is .NET just miles ahead or am I delusional? by cqqxo4zV46cp on Saturday April 13, 2024 @07:01AM (#40022166)
What new OSs?
Re:Is .NET just miles ahead or am I delusional? by imadj on Saturday April 13, 2024 @07:17AM (#40022276)
I think it'd be easier to list the ones that uses .net
Re:Is .NET just miles ahead or am I delusional? by Joker_vD on Saturday April 13, 2024 @07:10AM (#40022228)
I don't know, Midori?
Re:Is .NET just miles ahead or am I delusional? by coldtea on Saturday April 13, 2024 @10:04AM (#40023230)
That's the main reason. New OSs like Fucsia have started being written in Rust, and part of OSs, including Windows and now Linux too, have also adopted it.

If we had more mature systems languages suitable for OS development sooner, people wouldn't use C and C++.

Re:Is .NET just miles ahead or am I delusional? by chpatrick on Saturday April 13, 2024 @07:07AM (#40022208)
People love to complain about web development TypeScript is genuinely a great language in my opinion. The browser environment is really powerful these days and runs on everything.
Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @07:43AM (#40022435)
I mean it's great compared to... javascript?
Re:Is .NET just miles ahead or am I delusional? by chpatrick on Saturday April 13, 2024 @09:44AM (#40023093)
It's great compared to almost every mainstream language. The only downside is the legacy JavaScript stuff it inherited but you get over it pretty quick.

You're obviously not going to use it for low level or high performance system programming, or numeric stuff where you'd use Python, but for day to day getting stuff done it's amazing.

Re:Is .NET just miles ahead or am I delusional? by williamcotton on Saturday April 13, 2024 @07:41AM (#40022424)
If you’re going to compile a language to JS, why pick TypeScript?

The Fable compiler for F# barely adds any cost on top of what TS adds in terms of dependencies, compilation and tooling and IMO gives you a much better language for developing applications. And you still get to use the JS ecosystem.

Most of the cost is related to familiarity with both F# and JS, node and the browser.

But once you match on a pipeline of Results you can never go back!

Re:Is .NET just miles ahead or am I delusional? by lolinder on Saturday April 13, 2024 @08:05AM (#40022591)
You pick TypeScript because you can compile it to JavaScript by hand or in your head. The file size is smaller because there are no runtime features to bundle. When you're looking at the compiled version it's still recognizable as your code just without the types, when you're stepping through things in the debugger there are no surprises, line numbers for errors point you to places that are completely unsurprising because TypeScript is just JavaScript with a type system.

I've tried plenty of other to-JS compilers, even for languages that I love, and I still choose TypeScript every time.

Re:Is .NET just miles ahead or am I delusional? by williamcotton on Saturday April 13, 2024 @08:16AM (#40022646)
Have you even tried Fable? It’s leagues above other similar approaches and had true JS interop.

It doesn’t feel that much different than the TS compilation process. It is not what you’re expecting.

Re:Is .NET just miles ahead or am I delusional? by grugagag on Saturday April 13, 2024 @09:18AM (#40022955)
The main problem with F# is low popularity and hence gig opportunities are a lot fewer.
Re:Is .NET just miles ahead or am I delusional? by williamcotton on Saturday April 13, 2024 @09:22AM (#40022978)
That is indeed the cost. However, the talent pool is much better. This means your developers aren’t as easily replaceable so that might impact management’s decision making.
Re:Is .NET just miles ahead or am I delusional? by williamcotton on Saturday April 13, 2024 @07:55AM (#40022523)
Really, downvotes?

Am I not contributing to the conversation? Has anyone else even mentioned F# or Fable?

Re:Is .NET just miles ahead or am I delusional? by FrustratedMonky on Saturday April 13, 2024 @08:07AM (#40022604)
I agree here.

I wish that instead of TypeScript, MS had just used F#.

It seems like they took some of the concepts of what can be done in F# and made TypeScript. I wish they had just stuck with F#.

It's almost like it was marketing, like they didn't like how F# was viewed so TypeScript was a re-branding.

Maybe it is because TypeScript can be considered a DSL that could be built by F#. Like Elmish.

EDIT> Yeah, not sure if enough people understand F#. You can easily build TypeScript from F#. Or maybe the downvotes are from Haskell people that just view, a functional language can build anything so it isn't worth commenting on.

Re:Is .NET just miles ahead or am I delusional? by AndrewDucker on Saturday April 13, 2024 @08:37AM (#40022760)
Typescript is a superset of JavaScript. Every JavaScript file is a valid Typescript file. This is not even slightly true of F#.
Re:Is .NET just miles ahead or am I delusional? by chpatrick on Saturday April 13, 2024 @09:42AM (#40023079)
Because it has a strong, really well thought out type system, tons of industry adoption, good debugging in the browser and works with the existing ecosystem.

We tried Haskell in the browser before and it was a huge mistake. We want back to TypeScript afterwards.

Re:Is .NET just miles ahead or am I delusional? by williamcotton on Saturday April 13, 2024 @11:54AM (#40023947)
What makes F# work so well for JS interop is the support for objects and OOP while still offering up all of the syntactic niceties of an ML language like pattern matching, monad-like computation expressions, etc.

Haskell wouldn't work in this context.

I've had a very easy time debugging Fable compiled projects.

Again, I have extensive node and JS experience which is absolutely required for working on a Fable project.

I would argue that the hardest parts of TypeScript aren't that much less of a leap than F#.

I would argue that this code is easier to debug than the equivalent .tsx:

  [<ReactComponent>]
  let Counter() =
      let (count, setCount) = React.useState(0)
      Html.div [
          Html.button [
              prop.onClick (fun _ -> setCount(count + 1))
              prop.text "Increment"
          ]
  
          Html.button [
              prop.onClick (fun _ -> setCount(count - 1))
              prop.text "Decrement"
          ]
  
          Html.h1 count
      ]
And this basically looks like JS to begin with:

  [<ReactComponent>]
  let ShowGreeting(props: {| greeting : Greeting |}) =
      React.fragment [
          Html.h2 props.greeting.heading
          Html.h4 props.greeting.subheading
          Html.p props.greeting.content
      ]
  
  app.get("/", fun req res next ->
      promise {
          let! response = 
              req 
              |> gql "query { greeting { heading subheading content } }" {||}
              
          match response with
          | Ok response -> 
              let greeting : Greeting = response?greeting
              ShowGreeting ({| greeting = greeting |})
              |> res.renderComponent
          | Error message -> next()
      }   
  )
Again, Result types! Computation expressions! Error handling with these constructs is well worth the price of admission.

Compare this to the try/catch approach you'd be using in TS:

https://fex-template.fly.dev/form-validation

Re:Is .NET just miles ahead or am I delusional? by chpatrick on Saturday April 13, 2024 @05:42PM (#40026428)
What does debugging look like?
Re:Is .NET just miles ahead or am I delusional? by Xeamek on Saturday April 13, 2024 @07:05AM (#40022192)
Have no idea why people dow vote you, you are obvously correct abiut javascript being popular because its popular, not because it is a good tool in isolation.

Besides,Isn't typescript developed by the same people who made C# and also takes quite few inspirations from it?

Re:Is .NET just miles ahead or am I delusional? by throwaway2990 on Saturday April 13, 2024 @07:11AM (#40022233)
The people downvoting are the same people who would be writing “m$”
Re:Is .NET just miles ahead or am I delusional? by AndyMcConachie on Saturday April 13, 2024 @07:10AM (#40022223)
> Yes, we're stuck with it.

Google is the only company that is in a position to do anything about this and they gave up on Dart. So yeah, we're basically stuck with it.

Re:Is .NET just miles ahead or am I delusional? by throwaway2990 on Saturday April 13, 2024 @06:52AM (#40022116)
Sounds like you haven’t used .NET. Just peaked over the fence and formed an opinion.
Re:Is .NET just miles ahead or am I delusional? by omnicognate on Saturday April 13, 2024 @06:58AM (#40022141)
I can't speak for the person you're replying to but I have long professional experience with .NET and agree with what they said. I left my last job specifically to get away from it.
Re:Is .NET just miles ahead or am I delusional? by criddell on Saturday April 13, 2024 @07:11AM (#40022241)
What set of technologies do you prefer?
Re:Is .NET just miles ahead or am I delusional? by omnicognate on Saturday April 13, 2024 @07:51AM (#40022491)
C++ and Python. Probably Rust too at some point in the future, but while I love using it my own time I wouldn't recommend its use in my working environment yet.

This is not a universal thing. I wouldn't recommend these languages for every problem and there are lots of places where C# and others definitely makes a lot more sense (including, arguably, the problem domain in my last role). It's just what I like to work with and what is best suited to the work that I do and enjoy.

Re:Is .NET just miles ahead or am I delusional? by FrustratedMonky on Saturday April 13, 2024 @08:11AM (#40022627)
Any other details you can provide.

It seems like .NET is really geared toward business cases. But .NET is huge, so covers a lot, and not all great.

If you were doing something embedded, or specialized. Maybe that is thing.

On other hand. I also used to love .NET, but when I tried using Python, I did have to agree Python was really fast for simple cranking out little programs.

Re:Is .NET just miles ahead or am I delusional? by omnicognate on Saturday April 13, 2024 @08:42AM (#40022781)
"Business" also covers a lot. I work in a specialised part of finance, but specialised requirements aren't rare. There is an enormous amount of software written across the world that fits well into the middle ground catered for by .NET, but there is also a lot that doesn't.
Re:Is .NET just miles ahead or am I delusional? by throwaway2990 on Saturday April 13, 2024 @07:08AM (#40022212)
22 years of .NET. Unsure what mess of DSL for web config there is. It’s easier to onboard new devs now than any other time. The worst time was .NET Core 1.0 release. .NET Core hardly breaks backwards compatibility unless you’re using junk like WF/WCF. Telcos don’t universally use erlang. Academia doesn’t universally use python (actually never met anyone who used it at uni, must be an American thing). Loads of good/bad libs? Have you looked at Ruby/node/c++ etc? That’s a mess of good and bad libs.

The OP and yourself must struggle with programming. shrug

Re:Is .NET just miles ahead or am I delusional? by omnicognate on Saturday April 13, 2024 @07:55AM (#40022524)
> The OP and yourself must struggle with programming. shrug

"Everybody who doesn't share my language preferences must be bad at programming." Enlightened thinking there.

Re:Is .NET just miles ahead or am I delusional? by BlueTemplar on Saturday April 13, 2024 @08:48AM (#40022811)
It's more a fields thing.

Biologists are all over R, physicists - Python, &c.

Re:Is .NET just miles ahead or am I delusional? by neonsunset on Saturday April 13, 2024 @01:26PM (#40024572)
You’re attributing historical choices (or choices that happened before .NET even existed the way it is today) to inherent qualities of technology in the current situation.

This is flawed logic and I assume people upvote it for visibility rather than genuine agreement.