Hacker News new | past | comments | ask | show | jobs | submit login

Those are 3 options, and have different nuance. They also were added to the language in later versions but you can use what you what works, I find it hard to see how that makes the language incoherent as if multiple options are bad.

What exactly changed with a for loop?

The runtime is different from the c# programming language. Originally when this all started, Windows was the focus and Linux/open-source were not an option, so saying it should be there from v1 doesn't fit when there was only one OS that it was planned to run on.




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.


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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: