3 ms·
If you've ever used C#, imaging being able to implement LINQ in pure C# (as in, it's not part of the language, but the language itself gives you the ability to
by orthecreedence 14y ago
If you've ever used C#, imaging being able to implement LINQ in pure C# (as in, it's not part of the language, but the language itself gives you the ability to add it with the exact same syntax as it exists as part of the language). That is what macros give you. You can extend the language's syntax to your liking.
If you haven't used LINQ, then I'd have a hard time thinking of another example, since most languages have fairly uniform syntax.
- kenjackson 14y agoAlthough LINQ is basically pure syntatic sugar. I actually prefer the method syntax as it's consistent with the rest of the language. Extension methods are all that is needed for it. http://msdn.microsoft.com/en-us/library/bb397947.aspx http://msdn.microsoft.com/en-us/library/bb397947.aspx