3 ms·
> built a multiple language oriented vm that enables language features so varied that even the standard java-like language C# rivals ruby and python in expressi
by thebluesky 14y ago
> built a multiple language oriented vm that enables language features so varied that even the standard java-like language C# rivals ruby and python in expression
Since the JVM happily runs Ruby, Groovy, Clojure, Python, Scala the point it moot. Aside from that C# does not rival Ruby in expressiveness.
- tinco 14y agoThe point is not moot that .Net was designed to support multiple languages, regardless of wether multiple languages run on the JVM. The JVM was designed to support only one language, Java, it is generic enough to run any language, but not efficiently or easily per se. The bytecode language is not standardized, and there is no standard assembler language for it. New features to the JVM are only added when they are required for Java. In contrast the instruction language and bytecode of .net are standardized and it has a standard assembler language, with an actual assembler and disassembler. Design of the CLR is actually driven by multiple languages like F# and the Iron projects. I'll bet you that the creators of JRuby and Clojure would love to have the features the CLR offers. I say it does rival ruby, you say it doesn't, good discussion.
- thebluesky 14y agoThe point my original post makes is that .NET having concurrent GC is not exactly groundbreaking. This doesn't have anything to do with the so-called expressiveness of C# relative to Ruby. >The bytecode language is not standardized, and there is no standard assembler language for it There is a formal spec here: http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf > New features to the JVM are only added when they are required for Java. This is another false assumption: http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html http://blog.headius.com/2008/09/first-taste-of-invokedynamic... >I say it does rival [the expressiveness of] ruby, you say it doesn't, good discussion. Not really, is more like a generally accepted fact. e.g. Ruby typically uses 2-3x less code than C# to do the same thing: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=yarv http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
- yread 14y ago> There is a formal spec Not really the same thing as an ECMA standard http://www.ecma-international.org/publications/standards/Ecma-334.htm http://www.ecma-international.org/publications/standards/Ecm... > Ruby typically uses 2-3x less code than C# Perhaps you wanted to use a different link? This one says that it is ~10 times slower?
- tinco 14y agoEveryone knows that ruby is ~10 times slower than anything else the question is how the expressiveness compares. Of course the amount is code is going to be greater because you are more explicit about types. I program in ruby for a living and do some C# as a hobby so I know the differences..
- thebluesky 14y ago> Perhaps you wanted to use a different link? This one says that it [ruby] is ~10 times slower [than C#]? The link is correct. See the "code" section where Ruby has 2-3x less code. I won't disagree about Ruby being much slower than C# and Java. Ruby slow[er]ness has to do with it being dynamically typed, which also makes it expressive. If you are after something which is more expressive than C# and faster than C# see Scala on the JVM: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=scala http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...