Reference types

Meso does not have an ultimate root type like the java.lang.Object in Java. Instead, every type scheme defines whether there is such a type in its scheme or not. For example, all reference types in the meso: scheme must be derived from meso:meso.lang.Object, whereas all reference types in the java: scheme must be derived from, of course, java:java.lang.Object. There is no inheritance relationship between these two Object types:

namespace meso:;
import meso:meso.lang.Object Mo;     // Mo is a type alias
import java:java.lang.Object Jo;     // Jo is a type alias
import java:java.lang.System;

public class Foo {

   public static void main(string[] args) {

        Mo o1 = new Mo();
        Jo o2 = new Jo();

       System.out.println( o1 instanceof Mo );     // true
       System.out.println( o1 instanceof Jo );     // false

       System.out.println( o2 instanceof Mo );     // false
       System.out.println( o2 instanceof Jo );     // true
   }
}

Note that in the example above, Mo and Jo are type aliases. Visit the type alias page for more information about it.

Types in the imop: scheme, on the other hand, do not have a common root.