Is ECMAScript really a dialect of Lisp?

后端 未结 9 1445
攒了一身酷
攒了一身酷 2020-12-13 12:24

A friend of mine drew my attention the welcome message of 4th European Lisp Symposium:

... implementation and application of any of the Lisp dialect

相关标签:
9条回答
  • 2020-12-13 13:07

    Brendan Eich wanted to do a Scheme-like language for Netscape, but reality intervened and he ended up having to make do with something that looked vaguely like C and Java for "normal" people, but which worked like a functional language.

    Personally I think it's an unnecessary stretch to call ECMAScript "Lisp", but to each his own. The key thing about a real Lisp seems like the characteristic that data structure notation and code notation are the same, and that's not true about ECMAScript (or Ruby or Python or any other dynamic functional language that's not Lisp).

    Caveat: I have no Lisp credentials :-)

    0 讨论(0)
  • 2020-12-13 13:09

    Not a 'dialect'. I learned LISP in the 70's and haven't used it since, but when I learned JavaScript recently I found myself thinking it was LISP-like. I think that's due to 2 factors: (1) JSON is a list-like associative structures and (2) it's seems as though JS 'objects' are essentially JSON. So even though you don't write JS programs in JSON as you would write LISP in lists, you kind of almost do.

    So my answer is that there are enough similarities that programmers familiar with LISP will be reminded of it when they use JavaScript. Statements like JS = LISP in a Java suit are only expressing that feeling. I believe that's all there is to it.

    0 讨论(0)
  • 2020-12-13 13:12

    No it's not.

    In order to be considered a Lisp, one has to be homoiconic, which ECMAscript is not.

    0 讨论(0)
提交回复
热议问题