Hacker News new | past | comments | ask | show | jobs | submit login

Yes, JavaScript also has a single namespace, like a Lisp-1.

The advantage of a Lisp-2 is that it makes macro writing easier; you can include calls to known functions in the expansion without having to deal with the possibility that those names have been shadowed.




POSIX shell is dual-namespace, OTOH.

A variable foo, referenced as $foo, has nothing do with a function foo called as "foo args ...".

Imagine how stupid it would be if assigning a variable called ls prevented the ls command from working.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: