4 ms·
The home page looks like a tombstone of Common Lisp with a bunch of epitaphs on it. On the other hand, the spirit of Lisp has successfully taken over the world
by dmytrish 9y ago
The home page looks like a tombstone of Common Lisp with a bunch of epitaphs on it.
On the other hand, the spirit of Lisp has successfully taken over the world. The modern Lisp is called JavaScript.
I am perfectly aware of all the differences between Lisp and JavaScript and of the other languages that have influenced JavaScript (Self, Perl, Lua), but think of this: what made Lisp so great in the past?
- automatic memory management (compared to Fortran/C);
- very dynamic language and environment,
hooks on everything, live systems;
`eval`, available meta-interpreter;
- exceptions and condition system instead of segfaults;
- multi-paradigm, flexible programming language:
functional, OO and imperative programming when needed;
- research roots and great minds behind the language;
What JavaScript has fixed compared to Lisps?
JavaScript has fixed S-expressions; "I can program in S-expressions" does not mean "I should". Macros are harmful to programming in the large.
JavaScript applied existing lessons about data structures and object systems to the language: "I can roll out my own object system" does not mean "I should" and creates a Babel tower of incompatible object systems instead of a common language. JavaScript got rid of linked lists (that are awkward and impractical for everyday use) and introduced hash-tables into the language.
The modern JS ecosystem seems to be exactly what a Common Lisp ecosystem would have been if it had existed in the first place: the same diversity, the same problems, the same churn rate (because the language is powerful and writing new stuff is easy).
JavaScript has also successfully escaped perception of "a language for brains". Research background is actually harmful for a modern programming language. Examples are abound: Haskell is widely derided by the industry, slightly researchy Scala is "borderline unmanageable" for many and teams move back to Java; C++ with its experiments is tolerated for its interoperability with C, but gets a lot of (deserved) hate for its (often unnecessary) complication (hopefully, Rust has a good cover for the industry as "enhanced C++"); simplistic Go takes the world over by storm; the web is mostly written in PHP, whose inventors are as far from PL research as one can get.
- lispm 9y agoIt's just that Javasript will need to catch up with core language tools for another decade. Just compare your typical Javascript compiler and the language it provides with something like SBCL. Generally I agree that Javascript is similar, in many ways. But worse. Worse can be better, but we know that already. ;-)
- randallsquared 9y agoIt's only language tools at this point? What faint damning! :)
- lispm 9y ago'only' is your word, not mine.
- randallsquared 9y agoSure, your word was "just". I'm not sure what nuance I missed in "It's just that Javascript will need to catch up with core language tools for another decade" such that "It's only that..." would not work. (Anyway, I would agree with what I think is your actual position that it's more than just language tools; not arguing...).
- lispm 9y agohttps://www.collinsdictionary.com/dictionary/english/its-just-that https://www.collinsdictionary.com/dictionary/english/its-jus...
- sds2 9y ago> JavaScript has also successfully escaped perception of "a language for brains". Research background is actually harmful for a modern programming language. Those who consider javascript a good language usually lack the experience to compare languages effectively. Javascript is mostly appealing to front-end developers because they usually don't know anything else. Also, there are a LOT of front-enders so, you can explain the "popularity" with that. JS has many warts but js-zealots will just ignore it due to the hype. > simplistic Go takes the world over by storm; Proof on that? Because so far, the only ones using it are the ones who just don't know how to use other languages. The y prefer garbage code over learning generics... > the web is mostly written in PHP, whose inventors are as far from PL research as one can get. Proof on that "mostly" again? Also, most of those sites are unstable and known to be really hard to maintain. PHP was just an easy entry for unskilled labour which is a bad thing since they'll create worse products which will cost more in the long run. But beginners don't care about the long run - they just want the money from ads. > I am perfectly aware of all the differences between Lisp and JavaScript and of the other languages that have influenced JavaScript (Self, Perl, Lua), but think of this: what made Lisp so great in the past? Your points are too subjective: > automatic memory management (compared to Fortran/C) Did lisps took part in researching modern GCs? I don't think so. I thought it only had a simplisitc ARC only... > very dynamic language and environment, And it's a very useless feature - or prove it otherwise. Strongly and statically typed languages can `eval` too. > multi-paradigm, flexible programming language: functional, OO and imperative programming when needed; 1. First lisps wasn't OO and modern lisps are either NOT OO or support it poorly; 2. imperative programming is not that comfortable in lisp; 3. lisp is not a good FP language: just compare it to ML. > research roots and great minds behind the language; Or more like failed experiments and like-minded enterpreneurs.
- justinhj 9y ago> Those who consider javascript a good language usually lack the experience to compare languages effectively Javascript IS a powerful language with features that were not in other mainstream language for decades and some still don't have: first class functions, dynamic typing, lambda functions, closures etc. You only have to look at the diverse uses of Javascript to appreciate how far that power goes. As for the warts of JS any experienced Javascript programmer has learned to work around those and it takes a small effort to learn how to do so. > Proof on that "mostly" again? You really need proof that the majority of the web is written in PHP? As for an entry point for unskilled labour, my first PHP code was written after I'd been a C++ programmer for 20 years. I found it similar to Javascript; some warts to be aware of but otherwise a powerful language it's possible to be very productive in in a short amount of time. I refer you to the look at the many Facebook tech blog posts on the topic. Whilst PHP has some limitations around it's runtime model, if you can stick within it the modern PHP is a very good tool for backend development. > modern lisps are either NOT OO or support it poorly Have you read up on CLOS? It goes way beyond the features of, say, C++ object model. By limiting yourself to a subset you can have the basic OOP features; inheritance, polymorphism and encapsulation. It provides more and arguably non-oop features such as multiple dispatch, methods that can run before, after and around your own methods (aspect oriented in modern parlance). There is an excellent book by Sonya Keene on CLOS and OOP in Common Lisp.
- pjmlp 9y ago> automatic memory management (compared to Fortran/C); C wasn't even a thing when Lisp systems happened and they were running on computers that were quite humble when compared with PDP-11. When will JavaScript AOT compile to native code, or provide primitives for systems programming like Lisp?
- bhnmmhmd 9y agoThere was a discussion here about how Ruby is an acceptable Lisp: http://www.randomhacks.net/2005/12/03/why-ruby-is-an-acceptable-lisp/ http://www.randomhacks.net/2005/12/03/why-ruby-is-an-accepta... Ruby blocks cover a lot of what Lisp macros do. I don't know much Python and JS, but I'm guessing those don't have something similar to blocks/macros.
- lispm 9y ago> Ruby blocks cover a lot of what Lisp macros do That's a misconception. Ruby blocks are mostly unrelated to macro usage.
- gkya 9y agoPython's syntax is incredibly rigid. I'll only write in Python if I don't have no choice, or I'm paid decent money. I do like the ecosystem of the language tho, it has everything you'd like to write small utility scripts without reinventing the wheel. But Perl has them too, and I like the programmer-first nature of the language, so I use it for my scripting these days. I miss the pleasant debugging and incremental programme building of Elisp and CL in it, but I guess it's not impossible to have sth. similar in Perl, some sort of inferior-perl mode.
- klibertp 9y ago> JavaScript has fixed S-expressions Replacing them with a semicolon and curly brace riddled abomination; see CoffeScript and various syntax extensions that come with latest JS standards. Also note how many years it took for JS to get even very basic features, like `() => {}` lambda notationor multiline strings. In a language with a macro system you can implement both easily. > Macros are harmful to programming in the large. This is not true. Macros are mainly used to implement DSLs, and well designed DSL can shorten the code by an order of magnitude. Of course, when to create one is hard to say, but not harder than when to write a metaclass in Python. Would you advocate removing metaclasses from Python? When not for DSLs, macros are used as compile-time functions. You can easily write such macros in any language, provided you split your program in two parts: preprocessor (which parses and transform the code) and the code proper. That's a lot of work, which disappears with the introduction of a macro system. I don't think this has any impact on "programming in the large". Many "modern" and "systems" programming language feature macro systems. Haxe, Nim, Rust, Julia spring to mind immediately, followed by OCaml, Haskell, Elixir, Erlang and quite a few more. In other words: if you want to say that "macros are harmful" in some way you're going to need to provide some kind of argument and evidence. > creates a Babel tower of incompatible object systems instead of a common language. Three of the most popular Lisps - Racket, Clojure and Common Lisp - have an object system in the language. EDIT: Emacs Lisp might also qualify, but I don't remember if EIEIO is included by default in Emacs. > JavaScript got rid of linked lists (that are awkward and impractical for everyday use) Many languages outside of Lisps seem to disagree: Elixir and Erlang, Haskell, OCaml and Prolog, for instance. And btw: I disagree with this too. Linked lists are a very convenient and surprisingly universal data structure, but they really shine wherever you have a recursive algorithm. Which is, in the languages mentioned, almost all the time. > and introduced hash-tables into the language. Clojure, Common Lisp, Racket, Emacs Lisp and probably others provide a rich set of data structures, including vectors, bitsets, hashes, queues, sequences and more.
- srssays 9y ago> Linked lists are a very convenient and surprisingly universal data structure, but they really shine wherever you have a recursive algorithm. Which is, in the languages mentioned, almost all the time. Linked lists were way ahead of their time. Nowadays everything is so fast that we can probably use them without guilt, but there is still a sense of disgust associated them.
- gkya 9y agoThis is one uninformed, ignorant and incorrect comment. I was going to pick on individual things, but they are so many I can't be bothered. I'll instead concentrate my critique in one phrase: the opposite of each statement in this comment is true.
- jstewartmobile 9y agoI'm not drinking that kool-aid. It's pretty shameful that a language as old as Common Lisp has more batteries included than the VM of the web: http://www.lispworks.com/documentation/HyperSpec/Body/f_stg_tr.htm http://www.lispworks.com/documentation/HyperSpec/Body/f_stg_... That, and npm is a horror movie.
- catnaroek 9y ago> functional, OO and imperative programming when needed Please tell me how to get a reasonable implementation of list or tree values in JavaScript, without resorting to Gödel encodings or gentlemen agreements not to query object identities. Now recall that functions are mappings from values to values. How are we supposed to express computation as function evaluation without a rich set of values to work with? That's how well JavaScript (or Lisp, for that matter) supports functional programming. (I can't comment on object orientation support because I don't know of a logically consistent theory of objects.) > JavaScript has fixed S-expressions Weird. Lisps are traditionally semantically a mess (Scheme less so than Common Lisp, though), but the syntax, allowing for relatively easy metaprogramming, is their main saving grace. > Macros are harmful to programming in the large. Just because you don't understand macros, it doesn't mean other people can't put them to good use. > JavaScript got rid of linked lists (that are awkward and impractical for everyday use) and introduced hash-tables into the language. Practical Lisps provide several useful data structures out of the box. In any case, this is a matter of standard library design, not language design.
- deleted 9y ago[deleted]