4 Differences to SML

Types

The most important difference is that there is no static type checking. All type annotations are stripped from the programs.

Environment

The top level environment described in [MTHM97] is not fully implemented. Please have a look at SMLprelude.oz and SMLprelude.ozsml for a complete overview.

Module System

Signatures and then open declarations are not supported. Note that signatures have influence on the semantics of the open declaration.

structure s =
    struct 
        val a = 1;
        val b = 2;
    end;
 
signature S =
    sig 
        val a :int;
    end;
 
structure t =
    struct 
        val b = 3;
        structure v = s : S;
                    (* ^^^^ hides b  *) 
        open v;
    end;  
 
(* t.b = 3 *) 
 
structure u =  
    struct 
        val b = 3;
        structure u = s;
        open u;
    end;
 
(* u.b = 2 *) 

Patterns

Patterns of the form ref P, where P is a pattern, are not allowed.


Andreas Simon and Gerhard Schneider
Generated on Thursday, November 26th 1998, 23:35:31