3 ms·
> 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 ?. gener
by SideburnsOfDoom 12y ago
> 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
- darklajid 12y agoDid 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..
- SideburnsOfDoom 12y agoThat talk is not very mature yet ;) If I ever give it then there will be be slides.