-
-
Notifications
You must be signed in to change notification settings - Fork 5
keyword
A guiding philosophy of angle is to make sigil special chars (!@#$%^&*[}...) completely optional. A guiding principle of wasp is to make julia like beautiful math possible.
Keywords are just predefined functors or operators which cannot be redefined, but whose behavior can be _ refined_ ⚠: Most english particles and prepositions act as keyword. Noteworthily in on of to with while it that which
Otherwise they go through the exact same parsing and precedence mechanisms as custom operators and functions.
(Only exception: the 'if' keyword is not implemented as if(condition:block then:block else:block?) functor for
efficiency reasons and to allow syntactic sugar such as if 1:exit
.
optional values get denoted via maybe or '?' sigil keyword.
required values get denoted via '!' sigil keyword, or by default.
enum and variant are aliases which are only needed for interop, otherwise all node_pointer are prone to matching
Special care should be given to the and operator, which could in theory reflect much of the natural behavior:
Set union: women and children
Set union: they can read and write
Set intersection: my jeans were creased and dirty
Sequential: he turned round and walked out
Causal: there was a flash flood and by the next morning the town was under water’
And, there are many more usages. The technical word linguists use for the role words like "and" play is coordination.
https://en.wikipedia.org/wiki/Coordination_(linguistics)