qore
qore copied to clipboard
Reserved words
Disallow user declarations of some word, such as int
, hash
, True
, self
, if
...
The reasons are:
- using keywords such as
else
as function names leads to confusion - redefining
const True = False;
can be dangerous - parser needs to identify types in order to solve an ambiguity regarding type arguments (
list<int> a
)
Note that built-in functions that share names with types (int()
, hash()
) will still exist, users just wont be able to define them.
True
, False
, NULL
, and NOTHING
are now reserved words
TO DO:
- [ ] self
- [ ] argv