3 ms·
Boring 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
by hardware2win 4y ago
Boring 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).
- hardware2win 4y ago>And then C# has some questionable features (extension methods: methods for a class but that are not part of the class code). I dont think people share this opinion. Extension methods are very handy and powerful while being simple and you can see how similar vision works well in Rust: impl trait for type It allows e.g library makers to create strong small core and users/community to create their wrappers/integrations easily
- javcasas 4y agoExtension methods are "I want a function whose first parameter is this type defined outside, but the programming language shoehornes me so much into classes and objects that I have to do all this extra ~bullshit~ boilerplate to have a function whose first parameter is this type defined outside". Imagine having to create a monad, including the `pure` and `bind` operations every time you want to increment a variable. That would be bullshit, well, because it's bullshit. Even the haskell guys figured out it's bullshit and implemented types and operations (IORef) to simplify it. C# hasn't figured out yet you should not have to wrap your function in a namespace and a class.
- hardware2win 4y agoWeird definition since it misses the point. Extension methods are: I want to add a new method(not function) to object which I dont have control of (in the code sense) So I can call "externalObj.MyNewMethod()", so extend its behaviour
- javcasas 4y agoYep, a weird definition. "I want to add a new not-a-method (because it can't access private stuff, unlike real methods) so that I can do "externalObj.MyNewMethod()" because doing "myNewOperation(externalObj)" is somehow forbidden."
- hardware2win 4y ago