Open msprotz opened 3 years ago
There are two parts in this:
Regarding these, this issue could be closed; however…
Builtins still have added power though, e.g. they can be overloads. More importantly, while there may be no need for them to be keywords, the parser is the only place at the moment where we handle multi-lingual input ; so this raises the question of how to handle internationalised libraries…
I think it's time for a general syntax for arbitrary function calls, not just built-in functions that each have their dedicated keywords.
I would envision things such as
where the namespace is optional
internally, this would be implemented as follows:
open
statementsmin
,excess_of
)open builtin
at the beginning of each fileThat way we don't rely on a limited set of known keywords (this does not scale, even with a hash table of keywords in the lexer) and we can make it feasible to extend the set of compiler built-ins. Also, this paves the way for proper handling of names once we have proper modularity.
Thanks,
Jonathan