You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neil Ellis edited this page Jul 27, 2017
·
4 revisions
Notes for the design of a static type system
The static type system provides compile time constraints in the forms of sets of static values.
Set types (static types) are provided as a set of static values between ||.
|"red","green",1:20|
In the above example the value being constrained can be either "red", "green" or in the range 1:20.
Any value can be supplied in the constraint as long as it is a static value.
Type intersection
|"red","green"| b;
|"red","green",1:20| a = b; //correct b is a subset of a
|"red"| a = b; //error b is not a subset of a
|1:20| a = 4; // correct 4 is a subset of 1:20
|1:10,15:20| a = 12; // error 12 is not a subset of |1:10,15:20|
|"red","green",1:10| c;
|"red","green",1:20| a= c; //correct c is a subset of a
The Wiki is used for language design and developer notes, not for documentation. Please see https://sillelien.github.io/dollar for the language docs.