3 ms·
It’s interesting that odersky helped put generics in Java and also made Scala. Don Syme helped put generics in .net, and then made F#. It feels like two people
by nickpeterson 3y ago
It’s interesting that odersky helped put generics in Java and also made Scala. Don Syme helped put generics in .net, and then made F#. It feels like two people on a very similar trajectory.
- mjburgess 3y agoThe 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.
- santiagobasulto 3y agoI didn't know Syme helped with generics in .net. Very interesting indeed. I think it makes sense for these people to create their own "perfect" languages. I'm not aware of C#, but I know (or knew) Java very well. And Generics always was a half-baked option for a broken language. From a purists' perspective, in Java "everything is an object", except ints or floats, but we have Integer or BigInt, but then we have `null`, but then... if Integer extends from Number, does that mean that a List<Integer> extends from List<Number>? Nobody knows... Those things are what I feel Odersky wanted to solve and couldn't with Java, so he went "Bender Style".