5 ms·
Clojure does not have an alien syntax. As with Lisps in general, it has almost no syntax. (operator param param ...) Done.
by blunte 9y ago
Clojure does not have an alien syntax. As with Lisps in general, it has almost no syntax. (operator param param ...) Done.
- grzm 9y agoAlien is relative. For someone who has only worked with, say, Algol derivatives, it can take some getting used to. Likely less than people often think, but it's still a shift. And it's hardly the point of the submission as a whole.
- jrs95 9y agoAliens on the other hand isn't relative at all, it's objectively the best film in the franchise.
- ken 9y agoIt has much more syntax than any other Lisp I know, and it seems alien even coming from Common Lisp. In addition to the usual (list) and 'quote and `backtick and :keyword and ;comment, it has [vector] and {map} and #{set} and #(function) and @deref and #"regex" and ^metadata and #?(:conditional) and ... (Yes, several of those are implemented as reader macros. I don't see how that would make them any easier to learn than the same feature implemented as "syntax".) That's not a knock against it. I think Clojure is the best general-purpose language today, but we've come a long way in the past few decades. Lisp is no longer a language whose implementation fits on a blackboard (and everyone extends it in their own way). We've discovered a bunch of common functionality that almost all programs need, and pushed it up into the stdlib and language.
- solaxun 9y agoTrue, but i don't have to remember 5 different map implementations either :)
- dragandj 9y agoIt's only optional though. You can use (list 1 2 3), (vector 1 2 3), (hash-map 1 2 3 4), and (fn [x] (inc x)).
- tytytytytytytyt 9y agoThat's not relevant here. Most code uses those things, no??
- ken 9y agoI wouldn't say features like [vector] are optional alternatives to (vector), if you can't write even the simplest function without using the [vector] syntax.
- agumonkey 9y agoIt seems that some people really really love syntacticfull languages rather than uniform symbolic/functional notation.
- oblio 9y agoConsidering all the mainstream languages, some would argue that most people prefer them.
- blunte 9y agoThat would be like saying most people prefer VHS to Beta. Systems don't always/often win because they're the best or most liked. As with political views, most people prefer the ones they first learned. Only later in life, perhaps after becoming dissatisfied with what they know, they may risk trying something very different. My CS education was the typical Pascal/C/C++, so it wasn't decades later until I actually learned a Lispy language. But I had read enough to know that a lot of very intelligent people had loved Lisp; surely there was something to that. Likewise, the people who grew up on Lisp probably only grudgingly moved _down_ the ladder to use some of the more popular languages ;).
- oblio 9y agoYeah, but it's not like Lisp is a surprise to many IT people. It's old, it has a rather enthusiastic grass root following that promotes it and various universities have at least a few courses using it.
- agumonkey 9y agoto me lisp is its own problem, its value is that it gives you too much it becomes anti social. Society likes ignorance and delegation, lisps gives you the ability to have everything into one atom and mold it as you need it. But that's only useful for 1) people with that kind of mindset 2) hard problems that fall off mainstream/commercial support
- lispm 9y ago
- lispm 9y ago> As with Lisps in general, it has almost no syntax That's not true. Lisp has lots of syntax - actually more than most programming language, because the syntax is arbitrarily extensible via macros. The idea of (operator param param ...) is only valid for function calls, but even then the syntax is slightly more complex, since several Lisps have keyword arguments. But besides (operator param param ...) Lisp also has: ((lambda (arg ...) . body) param ...) (special-operator ...) and (macro-operator ...) Each special operator comes with syntax. Example is LET. LET is not (LET param param) but (let (arg ...) declarations . body) where arg is arg | (arg value) declaration the is something complex like (declare (type (integer 0 3) arg)) for a type declaration for the variable arg, which is an integer in the range of 0 to 3.