Hacker News new | ask | show | jobs
by pjmlp 2902 days ago
Multiple designs for the same feature makes a language harder to understand for beginners, only understandable by those that grew up with language.

I got it wrong, it was foreach, not for.

The semantics for the variable were wrong when given into a closure, it was a breaking change in C# 5.0 to fix it.

https://www.jetbrains.com/help/resharper/AccessToForEachVari...

https://stackoverflow.com/questions/12112881/has-foreachs-us...

Thing is, there isn't just one version of Windows, and updating the CLR in place can be lots of fun, to the point many enterprise postpone it ad infinitum.

This was the original driving idea for .NET Core, when ASP team started doing it, making it easy to allow IT to update Windows production servers to newer versions, porting to other platforms came afterwards.

2 comments

Can you say how those make it incoherent? 3 different ways to define a function, a breaking change in the language a while back. And only their implementation run time was tied to the OS, Mono came along and provided another
They are not the same features, delegates and lambdas are very different even if they look similar, and go far beyond just event handling. Also what language is perfect at version 1? It's good that the language keeps evolving and gets better and beginners can learn just fine.

Are you stuck on .NET Framework? If you arent then .NET Core already solves all of the maintenance problems by being deployed completely self-contained. It's a similar problem with many other language toolchains as well and .NET Framework at least saves work by being a single install that can be automated away with group policies. Enterprises postponing software updates is a problem with the enterprise, not the framework.