Hacker News new | ask | show | jobs
by seanmcdirmid 2953 days ago
You can also roll your own expression language using operator overloading and then plug that into the DLR or HSL, or whatever as needed (I did this in https://archive.codeplex.com/?p=bling). It doesn’t allow for statements, however, which introspection gives you.

It is much harder in the new UWP, however, where dynamic features (reflection, introspection, native JIT via the DLR) are no longer guaranteed to be present.

1 comments

Don't forget that Linq operates over duck-typed extension methods, so you can also define your own wizardry there.
Extension methods are important to doing an EDSL in C#. Link syntax is mostly a dud, however.
Hopefully the weird special-case LINQ syntax will die out soon. The only time I've found it remotely more helpful than method-chaining is when doing some nasty joins that I probably shouldn't have been doing in the first place.