3 ms·
In my language f.g(x) is syntactic sugar for g(f, x). Prefixing with the typename of f is not needed due to function overloading. (Which basically does the sa
by Ono-Sendai 11y ago
In my language f.g(x) is syntactic sugar for g(f, x). Prefixing with the typename of f is not needed due to function overloading. (Which basically does the same thing I guess)
- mappu 11y agoInteresting! Do you have separate symbol tables for functions and variables, then? I've taken the major design decision that there's only one symbol table for variables, so every function is a functor. I'm not sure it's possible to reconcile this with function overloading (Go/Javascript don't) EDIT: i suppose you could have a different symbol table for each variable type, incorporating function arities.
- Ono-Sendai 11y agoI don't really use symbol tables in the compiler. But with function overloading, binding needs to be done by name and type, yes. It does complicate the binding process significantly.