4 ms·
.Net itself is fundamentally OOP. Lambdas are implemented as classes with an Invoke method, F# enums are implemented as classes with variants as subclasses, etc
by Arnavion 4y ago
.Net itself is fundamentally OOP. Lambdas are implemented as classes with an Invoke method, F# enums are implemented as classes with variants as subclasses, etc. So if "overcoming OOP defaults" is the goal then making a new .Net lang that isn't OOP doesn't achieve much.
So it would have to be either be a new native language, or a new managed language that also comes with a whole new managed runtime. For the former, Rust is already satisfying that need within Microsoft. For the latter, there's even less demand both inside and outside.
- zengid 4y agoYeah I argree, making a new lang for a vm runtime doesn’t make as much sense when rust is right there, because the vm itself has a lot of baggage and limitations (OOP baked in, start up time,etc). The dotnet team seems to be moving mountains to squeeze more performance out of the VM, which is awesome, but how much further can it go?
- andsoitis 4y agoproductivity on the CLR and JVM is light years ahead of that in Rust. Rust has its niche, but it isn’t superior to broad surface that the managed runtimes provide leverage for.
- BenGosub 4y agoHow come classes are being used in a functional language?
- layer8 4y agoClosures and objects are very similar: a bunch of data with associated code that you can call. See also https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent.
- mastax 4y agoClasses are part of the .NET intermediate representation (CIL) that the compilers emit and that the virtual machine executes. OOP is baked in at a low level.
- javcasas 4y agoYou know we used to call it Microsoft Java, right? I mean, going beyond the sarcasm, ultimately C# copied most (if not all) the Java design decisions: * OOP baked in (more like hardcoded into the execution model) * Heavyweight VM that needs to be installed apart, that tries to achieve better performance by using way more resources (runtime/VM that needs to recompile the code multiple times instead of ahead of time compilation) * 1 main OOP language, a few second class citizen languages * Claim to be 1 stop shop for all development needs, falls short by pretending all development needs outside what it covers to be invalid/inferior * Sold to managers as the magic way to have cheap replaceable developers
- hardware2win 4y agoBoring comparison tbh. VM doesnt have to be installed, you can deploy the single file app with it + there is AOT too Btw. C# has reified generics
- javcasas 4y agoWow! Big differences! Ocaml has a VM which is included by default (70kb), and can also compile to native (skip the VM altogether). It has been like that since at least 2002 (the first time I checked it, probably before that). Haskell has HKT, which generalize generics. Java and C# share 95% ideas in comparison to stuff outside Java/C#. That's why the comparison is boring: there is very little to compare.
- hardware2win 4y agoSo we went from Java vs C# to C# vs the world? I see where this is going, anyway Another differences Approach to async Approach to ecosystem fragmentation Approach to GCs In general people would argue that C# > Java, but JVM > CLR
- javcasas 4y agoNow we are startung to talk serious. Yes, I'd like Java's ability to use and tune different GCs to be available in other places. Async is pretty much the colored vs non-colored function discussion, for which there are good arguments on both sides. Related to C# being better than Java, I think it is, but not in a significant way. If Java uses 100% boilerplate, C# uses around 90% boilerplate. An improvement indeed, but way more progress can be achieved. And then C# has some questionable features (extension methods: methods for a class but that are not part of the class code). Related to VMs, JVM may be better than CLR, but again both of them have an unacceptable footprint because you have to educate the final user on managing the internals of your application (yay I have to install, update and be wary of exploits for the Java Runtime/.net redistributable, and then different versions are subtly incompatible, so to use program X I have to uninstall the version I use for program Y).