2 ms·
> Almost every other somewhat popular language chooses to share a single namespace between functions and variables. Almost every popular language is also not a
by kazinator 6y ago
> Almost every other somewhat popular language chooses to share a single namespace between functions and variables.
Almost every popular language is also not a Lisp at all.
That must also be a well-informed, modern design decision; therefore, just don't make your language a Lisp.
> Examples include Clojure, Janet, Python, Java, JavaScript, and even Rust.
The latter three are completely unsurprising given that Algol, Pascal and C have one namespace for functions and variables.
Oh, and object file formats for assembly languages have one namespace for functions and variables: there are just symbols which name anything.
However: object file formats are actually smarter than that: they have named sections, which give the user any number of namespaces. You can have dynamic symbols, debug symbols, symbols needed during initialization only, ... Within a given section, though, symbols are in one namespace. You can't have an x function and x storage location both in the .text section.
Speaking of low-level, not all machines put code and data into the same space.
> The set of LISP2 languages is quite small these days. Besides Common Lisp and Emacs Lisp, both of which are over three decades old at this point, there are also Ruby and Perl.
Algol traces back as far as 1958. The hypothesis that the single namespace is a more modern development doesn't hold water.
When taking a historic look, you have to consider some of the years that were before you were born.