Comment on page

Types

The Type system is way more advanced and extensive than in Java. Dyvil introduces a variety of different sorts of types:
  1. 1.
    The top type any
  2. 2.
    The bottom type none
  3. 3.
    The null type: null
  4. 4.
    Primitive Types: boolean, byte, short, char, int, long, float, double
  5. 5.
    Object Types: String, Date, Object
  6. 6.
    Generic Types: List<int>, List<Option<Date>>
  7. 7.
    Tuple Types: (int, String)
  8. 8.
    Function Types: (int, int) -> int
  9. 9.
    Type Variable Types - T
  10. 10.
    Wildcard Types: _, +Number, -String
  11. 11.
    Reference Types - int*, String*, any^
  12. 12.
    Nullable / Optional Types - int?, String?, long!, List<String>!