So what, pray tell, is Lispy about JavaScript? You talk about anonymous functions and lambdas again, but, as I have already noted, almost all other mainstream languages have both, as well - most certainly both Python and Ruby do.
Other then the fact that lambdas and closures (I'm sure that's what you meant) exist, here are a few:
- It is object oriented at a fundamental level, but not in a specialized sense, so nested functions are the basis of functionality, and not object methods and/or functions with data around it. So functions are logic that can carry data, and not the other way around. (You can do it, but it's unsafe because everything is mutable.)
- And for closures, it's not the fact that they exist, but rather, how they are used. Closures (Or any function for that matter) are how you create private scope in the language and how you implement secure logic, further illustrating the paradigm of behaviors with storage, rather than storage with behaviors, which is a Lispy concept.
- Prototypes reverse the lookup between code and data again, very similar to how generic functions do it in LISP.
- Code and data can both be used interchangeably; code can be data, and data can be code.
- Any data (Whether functions, objects, or information) can be created via anonymous means and put anywhere.
And "key-based data" is just laughable - any language with an associative dictionary can do the same, even Java - even if the latter doesn't have syntax quite as nice. But e.g. in Python it's literally the same syntax:
Yes other languages have the above concepts. I wasn't saying they didn't. I was just hoping to draw attention to how similar the two languages were. (Which is why I called it key-based, because that's what it is in Scheme.)
Brendan Eich wanted to make a dialect of Scheme (A LISP), or at least a language as similar as he could when he first make JavaScript. Apparently the people at Netscape wanted the language to at least vaguely appear similar to Java. (Just silly marketing)
The entire creation process is actually really interesting actually...
http://bryanpendleton.blogspot.com/2009/11/coders-at-work-brendan-eich.html
With Scheme being the inspiration behind the language, I wanted to draw a few lines between the two to show that there are indeed a lot of similarities, and that if you treat JavaScript like Scheme, you'll have a much easier time with it.
At this point, I have to ask: are you actually familiar with other languages beyond JS and Lisp? In particular, are you familiar with Python, and especially Ruby? The latter in particular is much closer to Lisp than JS ever was.
I'm not gonna lie. I am unfamiliar with both Python and Ruby. Though my repertoire of languages extends beyond just JavaScript and LISP.
Either way, I only focused on those two languages because they were the two I wished to draw similarities between.