4 ms·
Actually, still true. You're right that LINQ expressions are syntactic sugar for C# calls, but that syntactic sugar depends on lambdas (introduced in C# 3) and
by gecko 17y ago
Actually, still true. You're right that LINQ expressions are syntactic sugar for C# calls, but that syntactic sugar depends on lambdas (introduced in C# 3) and expression trees (also introduced in C# 3), among others. You cannot write LINQ as you know it in C# 2. That's my point.
- arakyd 17y agoHeh. You still have anonymous delegates in C# 2.0, and you can roll your own expression trees if you really want them. Same thing for yield and extension methods. Of course your code will be much more verbose and unnatural, and you won't have as much compiler support. Yes my friends, we are deep in the Turing Tarpit, where the boundary between language and library is blurred, baroque architecture looms menacingly in the mist, and the bare metal is somewhere far below the fetid surface of the swamp. I hope you brought your safari hat and your elephant shotgun.
- dmnd 17y agoOk, but using the previous version of the language to demonstrate your point is much less interesting. Additionally, there is the issue of clarity: when I read "C#" I tend to assume that means the language as it exists today, not some previous version.
- gecko 17y agoYou completely missed the point of the article, which was that I can add these features to the language without waiting on the language designer. Microsoft added three key technologies to C# 3, one of which was syntactic sugar for the other two. That's irrelevant to my point.