Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 686 Bytes

types.md

File metadata and controls

23 lines (17 loc) · 686 Bytes
dyvil
v0.31.0

Types

The Type system is way more advanced and extensive than in Java. Dyvil introduces a variety of different sorts of types:

  1. The top type any
  2. The bottom type none
  3. The null type: null
  4. Primitive Types: boolean, byte, short, char, int, long, float, double
  5. Object Types: String, Date, Object
  6. Generic Types: List<int>, List<Option<Date>>
  7. Tuple Types: (int, String)
  8. Function Types: (int, int) -> int
  9. Type Variable Types - T
  10. Wildcard Types: _, +Number, -String
  11. Reference Types - int*, String*, any^
  12. Nullable / Optional Types - int?, String?, long!, List<String>!