9 ms·
Hot take but I wish they’d start a new lang in the spirit of what’s happening in swift/Kotlin instead of evolving C#. I use it everyday. I love the new pattern
by zengid 4y ago
Hot take but I wish they’d start a new lang in the spirit of what’s happening in swift/Kotlin instead of evolving C#. I use it everyday. I love the new pattern matching, it simplifies a lot of gnarly reflective type checks and feels good. Records are nice too. I see discriminant unions are coming soon. But they’re painting themselves into the corner in terms of syntax and overcoming OOP defaults. A fresh start would be incredibly expensive and risky, but it would bring in a lot of excitement and fresh faces. /rant
- 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).
- booleandilemma 4y agoYour take is cold, or lukewarm at worst. The language is getting complicated.
- jayd16 4y agoSo what's happening in swift or kotlin that's out of reach for C#?
- zengid 4y agoEverything they are doing in swift and Kotlin are within reach. Heck, those languages _copied_ a lot from C#, so it's the Original Gangster in terms of features. It's just that there's a lot of old baggage in there in terms of syntax and language defaults. Classes aren't sealed by default. Getting immutability requires lots of extra keywords, or you use `record`s, which are nice to use. I look at the new language features they're proposing, and it just feels like they are bending over backwards to add nice things because there's already so much there that they can't mess with. A clean slate would give them some freedom.
- cglong 4y agoWhere does TypeScript fit into this? It's a wildly successful language from Microsoft that's also interpreted but doesn't use the CLR. Disclaimer: I work at Microsoft, but not in the Developer Division.
- zengid 4y agoGreat question because I think TypeScript is the future in terms of a web stack. With the 'metaframeworks' (not just the ones from Meta, winky face) all moving towards a Server Side Rendering paradigm, I feel like a full-stack TypeScript world just makes so much more sense in terms of developer productivity. I also use TypeScript every day, and I absolutely love it. I feel like the power and flexibility of it's type-system are incredible tools for an industry programmer. I think TypeScript is going to get more mileage for me personally and I'll reach for things like C# less and less, because it feels like it's not keeping up with where the web industry is going. (Who knows, maybe they will dust off ASP.NET MVC and ditch Razor pages for some kind of .tsx like experience. A dev can dream..)
- CharlieDigital 4y agoStart a petition for T#. Merge C# and TypeScript. I want my C# pattern matching in TypeScript and TypeScript's fluidity in C#. Simplified initialization in C# without new(). Unless otherwise specified, use a default generic Dictionary<T,U> and infer the types for map initialization like: var x = { ["a"] = 1 }; Instead of: var x = new Dictionary<string,int> {...}; Then automatic type mapping and conversion utilities to objects: record class Rec(string a, int val); var k = x as (Rec) (Yes, can already be done with implicit type conversion operators or writing utility classes, but making it more like TypeScript would just make it easier to adopt)
- pjmlp 4y agoWhat spirit? Kotlin only matters due to Google's shenanigans on Android with Android Java, and pushing Kotlin as its replacement. It is J++ vs C# all over again. They could just as well buy JetBrains.
- samtheprogram 4y agoCool idea: how about making a .NET/CLR backend for Kotlin?
- pjmlp 4y agoIt will be as successfull as IronPython, IronRuby, Clojure.CLR, Scala.NET,...
- zengid 4y agoThe spirit of starting over instead of cramming more into an old language, but making the new thing highly compatible with the old thing via transpilers or runtime sharing (Swift with Objective-C, Kotlin with Java).
- pjmlp 4y agoWrong analogy, Kotlin with Java is an Android thing, on the JVM there is no Kotlin whatsoever, only another guest language among so many others. Maybe if JetBrains ever releases their own KVM, which by the looks of Kotlin/Native, is hardly something for the JVM ecosystem to worry about.
- bmitc 4y agoThere's no reason for such a language because I would argue that F# is superior to all of C#, Kotlin, and Swift, and it already exists.
- pharmakom 4y agoF# is pretty much that language.
- hardware2win 4y agoFresh start would be more likely due to async vs green threads