Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> a compile time feature. C# already has a ton of those, the most prominent so far are extension methods.

Yes, nameof is compile-time. Similarly, the ?. generates code (a "? :" or if statement) and so does the string interpolation (a call to string.Format).

I've even sketched an outline of a talk of the c# language features that are "just" sugar. e.g. walking through a statement like

  var evens = numbers.Where(x => x % 2 == 0);
and showing what it looks like without the compile-time sugar features like the lambda, extension method use of "Where", "var" inference, etc.

Of interest I suppose to just-beyond-beginner devs



Did you document that somewhere? I might be interested to share that internally. We're C# shop, but quite a number of my coworkers aren't exactly up to speed and a "Let's talk about 3.5 and upwards" session is planned in a couple of weeks..


That talk is not very mature yet ;) If I ever give it then there will be be slides.




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

Search: