Type Constructors 1

Type Constructor Formal Type
Enum Idea1 + Idea2 + Idea3
Cartesian (class, tuple, record, struct) Type1 * Type2 * Type3
Union (in C) Type1 + Type2
Reference (explicitly in C, with Objects in Java) Ref(Type)

Java Refs on ALL Objects, enums, arrays


          Apple a = new Apple; // a : NULL + Ref(Apple)
          // NO Refs on primitives
          bool x = true;       // x : bool
          

C/C++ Refs ONLY on things with *


          boolean x = true;       // x : bool
          boolean *y = true;      // y : NULL + Ref(boolean)
          Apple a = Apple();      // a : Apple
          Apple *b = new Apple(); // b : NULL + Ref(Apple)