Besides first-class features and lexical reach, what does JavaScript do with schema implementations?

I always wondered why Douglas Crockford continues to compare JavaScript with Schema. Yes, JS was supposed to be his designer; but besides supporting first-class functions and lexical reach (broken), what functions does JS have with Scheme, what makes it “Lisp in C Clothing”?

+8
javascript programming-languages functional-programming lisp scheme
source share
4 answers

Another thing that comes to mind is the widespread use of a single, ubiquitous data structure throughout the language and libraries: cons lists in the case of Schemas, maps (called objects) in the case of ECMAScript.

Then there is not only the fact that ECMAScript has first-class procedures, but these procedures are the only abstraction mechanism. (Or, more precisely, the encapsulation mechanism.)

+6
source share

One thing that should be high on this list is REPL. It looks like technicality, especially when these cues are usually hidden behind some developer tools, but it has a huge impact on the language. (For example, it is natural to have a real eval when there is a replica, etc.). Basically, dynamic code evaluation has the status of first class, which is extremely useful for something like JS and probably made much more success than functions of the first class (which were hardly used until several years ago).

+6
source share

Outside the top of the head, and also take a look at Wikipedia :

  • Block structure
  • Check execution
  • Eval
  • No (explicit) compilation step
  • Small but rich stdlib
  • Common namespace for procedures and variables
+5
source share

Well, JavaScript lacks homoiconicity , and this is one of the main properties of Lisp dialects.

0
source share

All Articles