logoalt Hacker News

twisterifficyesterday at 1:55 PM1 replyview on HN

> Try teaching someone C# nowadays. Completely impossible.

That isn't a reasonable take. Failing to teach a language by enumerating all its features is an indictment of the instructor and not the language.


Replies

NanoCoasteryesterday at 2:13 PM

I guess I overdramatized the situation a bit :) It's a passionate topic for me; as somebody who has been using C# at work for 10 years now, I'm just not happy with the direction the language has been taking.

You're right, it's not impossible and in general it's not among the hardest languages to teach. But I would argue, it is heading that way.

There are already so many ways to do things in C#. For example, try explaining the difference between fields and properties; sounds easy, but making it really stick is quite a challenge. And that's one of the simplest cases (and a feature I'm 100% in favor of).

And you will have to explain it at some point, because real codebases contain these features so at some point, it'll need to be taught. Learning a language doesn't stop when you can write a simple application, it continues up until at least you're comfortable with most of its features and their practical use. The quicker one can get people to that point, the easier the language is to teach, I'd argue.

One might also argue that learning never really stops, but that's beside the point :)

In general, my issue isn't any specific feature. C# has many features that are non-trivial to learn but still great: value types, generics, expression trees. Source generators are relatively new and I like them! I like most of the things they're doing in the standard library or the runtime. Spans everywhere is a nice improvement, most new APIs are sensible and nice to use and the runtime just keeps getting faster every release. Great. It's more the pure C# language side I have an issue with.

But every language has a budget of innovation and cognitive load that you can expect people to deal with, and C# is not using its budget very wisely in my opinion.

show 1 reply