3 ms·
> foo bar; // Is this an expression or a declaration? You need to check the symbol table to find out* Checking the symbol table is a simple one-liner. Pushin
by kazinator 7y ago
> foo bar; // Is this an expression or a declaration? You need to check the symbol table to find out*
Checking the symbol table is a simple one-liner.
Pushing all semantic information into the syntax so that the meaning of everything is known without any lookup is not realistic and will result in a bad language.
Lisp:
(a b) ;; what is this?
You need the full surrounding context to know whether it's b applied to a, value of b being bound to variable a, or a list of base classes a and b in a defclass or what, ... and it's good that way.