3 ms·
F# goes even further than c# and allows you to embed IL. Which allows you to do really fun things.
by Akronymus 3y ago
F# goes even further than c# and allows you to embed IL. Which allows you to do really fun things.
- akkad33 3y agoI'm very curious about F#. Can you give some code examples of how this allows dynamic typing?
- Akronymus 3y agoYou rarely, if ever, need it, except for performance considerations. https://youtu.be/NZ5Lwzrdoe8?t=2364 https://youtu.be/NZ5Lwzrdoe8?t=2364 This is the one thing that comes to mind, for me.
- WorldMaker 3y agoIn C# plenty of things embed IL, they just use the Reflection.Emit APIs to do that and don't have a direct embedded DSL. An advantage to C#'s dynamic over Reflection.Emit is that it uses System.Linq.Expressions under the hood. There's a lot of cool advantages to do that, including higher level caching and sharing a lot of the same infrastructure of IQueryable (and IQbservable, the Q there is not a typo). The DLR remains an underappreciated bit of great .NET engineering. (It doesn't help that most of the Iron languages went to maintenance bitbuckets.) (In a past life I did some amazing things with the DLR.)