3 ms·
> functions and variables live in different namespaces, so you could assign 4 to foo and then call it. The most famous language with this property is Lisp.
by coliveira 7y ago
> functions and variables live in different namespaces, so you could assign 4 to foo and then call it.
The most famous language with this property is Lisp.
- kazinator 7y agoUnix shells also compete in this category. We can have a $foo variable, and a foo command/function. GNU Make is another one, sort of. Makefile: warning = abc $(info abc = $(warning)) $(warning what?) Output: abc = abc Makefile:3: what? make: *** No targets. Stop. $(warning) is a variable, whereas $(warning args ...) is an operator call. If a macro is stored in a variable V, it cannot be called as $(V args), but using $(call V args). That's analogous to funcall in Common Lisp. Looks like the Lisp-2 approach is well represented in the famous language scene. :)