8 ms·
What makes JavaScript a Lisp? I associate Lisps with a small but immensely expressive core, powerful metaprogramming facilities, a very simple syntax, and an em
by aratakareigen 7y ago
What makes JavaScript a Lisp? I associate Lisps with a small but immensely expressive core, powerful metaprogramming facilities, a very simple syntax, and an emphasis on linked lists as the building block of syntax and, at least historically, of everything else, too. JavaScript has maybe one of those.
- garganzol 7y agoJavaScript is a LISP due to following properties: 1. Minimal core modeled on Scheme 2. Everything is a dictionary (globals, locals, objects, prototypes). This is a direct result of relying on LISP notion of an 'env' 3. Functions are first-class citizens 4. JavaScript is a dynamic language LISPs are fairly easy to spot. Their cores are minimal Scheme-like implementations with everything on top being a syntatic sugar over a few basic concepts. This approach makes the implementations surprisingly concise and powerful.
- lispm 7y agoJavaScript is not a LISP (aka LISt Processor) because of these properties: * Lisp is based on efficient procedures (usually with lexical scoping), not objects with properties (-> dictionaries) and complex scoping. * Lisp has a code representation based on lists of symbols (and other atoms) and an evaluator model for that. Identifiers in code are symbols. This is typically used both internally and externally (as textual source code). * Lisp is doing list processing at its core and applies it to itself. * Lisp provides forms of source transformations based on list processing: macros, ... JavaScript might be considered to be some non-symbolic non-list-processing Lisp/Scheme derived language, turned into an object-oriented language.