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.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>!
Last modified 5yr ago