4 ms·
Because non-homoiconic languages don't have "true" REPLs. At best they have "interactive environments". What's great about Lisp, and the point people complainin
by iLemming 7y ago
Because non-homoiconic languages don't have "true" REPLs. At best they have "interactive environments". What's great about Lisp, and the point people complaining about parentheses miss, is that you can eval any [sub]expression without any preceding ceremony. That is not possible in almost any other language (maybe with exception of Smalltalk), simply due to the nature of the language syntax.
In Clojure, if you have something like:
(foo [a b] ((c a) b))
you can evaluate every single part of it, you'd get immediate feedback, what is `a`, what is `b` and `c`, the result of `(c a)`, the result of the entire thing, etc. Similar thing in JS would be something like:
let foo = (a, b) => { return c(a)(b); }
It's already more difficult to edit, there's no "structure", it's not easy to evaluate arbitrary pieces without "dancing around", introducing temp variables. Given Clojure code snippet is also data, it can be send over the wire, send directly to the connected REPL instance, etc.
That's what gives Lisp developers a substantial speed of development. When people talk about "what's good about Clojure", they usually say: immutable data-structures, stability, hosted nature - can target JVM, JS, BEAM and CLR, can even have interop with Python and R. But the coolest thing about Clojure and Lisps in general - they provide "true" REPLs.
- capableweb 7y agoFeels like we're talking past each other at this point. You're preaching to the choir here, and not sure where that came from. Basically the question was "What language do you use?" and now you're trying to tell me why lisps are great. I agree with everything you're saying, I write Clojure code professionally during the day-time, but your comment just came from nowhere. Edit: or maybe you responded to the wrong comment?
- iLemming 7y agoWell, we're not in a private chat. Other people may read it as well.
- capableweb 7y agoAre you OK?
- iLemming 7y agoYes, I'm sorry for the confusion. You use Clojure, I use Clojure, we're both commenting in a Clojure related post. I know that I'm "preaching for the choir", and stating the obvious. But to many other people scrolling through the comments, all that may not be obvious.
- jibe 7y agoClojure community in a nutshell. Smart, but a little crusty.
- iLemming 7y agoPlease don't go that route. I've worked with several language ecosystems. Clojure community is one of the most open, acceptive, diverse and friendly communities out there. This thread is simply misunderstanding/misreading the intent of the commenters. It happens, nobody got hurt.
- e12e 7y agoSmalltalk isn't homoiconic? You can certainly eval parts of a python or ruby program (although indentation-as-block needs some care in python). In lisp you also need a useful scope (eg: if foo isn't bound "(foo 1 2)" won't be very useful).
- iLemming 7y agoNo, Smalltalk is not fully homoiconic, it has some nice "reflective" abilities, i.e. it's possible to view "code as data" that allows good REPL experience. But it's not a homoiconic language.