Wiki

Changes between Initial Version and Version 1 of DifferencesBetweenClrAndJvm

Show
Ignore:
Timestamp:
12/12/12 17:35:12 (12 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DifferencesBetweenClrAndJvm

    v1 v1  
     1= Differences Between the CLR and JVM = 
     2 
     3This is a quick reference to differences between the CLR and JVM. It also bleeds into differences between C# and Java whose features often include compiler-level-only features that the underlying VirtualMachine is not cognizant of. 
     4 
     5== CLR has... == 
     6 
     7 * CLR has unsigned types 
     8 * CLR has namespaces 
     9 * CLR has explicit interface implementations 
     10 * CLR allows non-overridding methods when the same signature (called 'new') 
     11 * CLR has value types 
     12 * CLR has non-virtual methods (I don't think JVM does) 
     13 * CLR has events 
     14 * CLR has `out` and `ref` parameters 
     15 * C# has partial classes 
     16 * C# has closures 
     17 * C# has yield 
     18 * C# can have multiple classes in a single file 
     19 
     20== JVM has ... == 
     21 
     22 * JVM has no generic types. This is purely at the compiler level. I've read that you cannot overload a method by a generic type such as List<of int> vs. List<of String>. 
     23 * Java has exception specification on the method level. 
     24 * Java has non-static inner classes 
     25 
     26== Other Differences == 
     27 
     28 * assemblies vs. jars 
     29 
     30== References == 
     31 
     32 * http://stackoverflow.com/questions/95163/differences-between-msil-and-java-bytecode 
     33 * http://stackoverflow.com/questions/682608/implementing-c-sharp-for-the-jvm 
     34 * http://stackoverflow.com/questions/59175/whats-the-difference-between-the-inner-workings-of-javas-jvm-and-nets-clr 
     35 * http://www.artima.com/intv/anders.html