4 ms·
The question, "how do we make functional languages popular, (useful?) in the enterprise?" was a question in the air for, i'd, say decades. The 00s answer was to
by mjburgess 3y ago
The question, "how do we make functional languages popular, (useful?) in the enterprise?" was a question in the air for, i'd, say decades. The 00s answer was to create a merger between enterprise langs (Java, C# etc.) and functional langs in a new language.
The net result, as we know now, was to push those langs to adopt functional features -- rather than to shift to others.
I suspect the question for the niche programming community, of the next decade, will be "how do we make effect systems popular?" or some such thing.
Or, "how do we make AOT metaprogramming popular?" etc. (cf., jai, zig... carbon, circle, ...)
I suspect if a post-C++ new-wave gets popular, with structural typing and ct metaprogramming, we might see the same in C# quite easily
- pjmlp 3y agoYou already get them with code generators and Rosylin, but it is a bit painful to use.
- SideburnsOfDoom 3y agoThere is also a new compiler feature, "interceptors" that swaps in calls at compile-time. https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12#interceptors https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... This looks very hard to use well, but that's because "it's not for you" to use directly in app code, rather it's a low-level building block for such AOT and code generation patterns and toolkits.
- gfraiteur 3y agoAgreed. Roslyn analyzers, code generators, refactoring providers and other extension points are not designed for application developers but are rather building blocks. We built a code generation and analysis framework based on these Roslyn extension points. It's called Metalama: https://doc.postsharp.net/metalama https://doc.postsharp.net/metalama.
- pjmlp 3y agoI hate it, as it is a bad approach to what should have been a proper AOP framework like PostSharp or Microsoft Fakes. Instead we will end with a special cased mini framework, designed to override reflection code for the purposes of AOT code generation. Something that AOT toolchains for Java have solved much better with agents, PGO and config files. From my point of view, it is neither a good approach to sort that out, nor a good AOP alternative.