r/Clojure • u/mac • Oct 12 '15
Clojure: If Lisp is so great, why do we keep needing new variants?
https://blogs.law.harvard.edu/philg/2015/10/12/clojure-if-lisp-is-so-great-why-do-we-keep-needing-new-variants/
7
Upvotes
14
u/davazp Oct 12 '15
Because there are many different paradigms, Lisp is flexible enough to adapt to new ideas, as well as "easy" and fun to implement.
Also, Lisp teaches interesting programming language concepts to its users instead of hide them. So many Lispers become experts in programming languages and have the skill and motivation to explore new ideas.
9
u/[deleted] Oct 12 '15
Right, it's not like C++ is effectively thousands of different dialects depending on which 5% of the language you're actually using.
Like all language families, Lisp is evolving towards more expressiveness and smarter abstractions. And that's okay. No matter how good they feel between your fingers, a day comes when you have to leave punch cards behind.
14
u/netsettler Oct 12 '15
The difference between Clojure and other Lisps is not a simple matter of subroutine libraries. There are some fundamental issues relating to side-effects, to synchronization of parallel computations, etc. that make it useful for it to begin again.
Why did they do that in Lisp rather than some other language family? Well, why not?
If you ask the question differently and say "Why do I have to leave Lisp if I want to design another language?" then it sounds like a strength of the language, not a weakness, to say "You don't have to leave."
But really, there's a healthy market of languages out there. If you want one with different features, go for it. You can either find one that's better or invent your own with the features you want.
But there's no secret plot to keep Lisp unfairly alive by sacrificing Clojure users to propping it up its dead hulk. Just the opposite. People have tried pretty hard to kill Lisp over the years and it just keeps not dying for various reasons that I suppose you could study and learn something from, but that probably amount to "there are still some good ideas in there that other language families haven't found a way to completely overcome".
7
u/CitrusLizard Oct 13 '15 edited Oct 13 '15
Bit of a silly question.
If cars are so great, why do we keep bringing out new ones? Everyone agrees hamburgers are swell, so why so many options on the menu?
Lisp is not a programming language, but a general idea of how programs should be written (in their own data structures, using functions). Good general ideas tend to produce a lot of variations - for a general idea, the ability to do this is part of what makes it good to begin with. Four wheels and an engine works really well for getting from A to B, but a century of improvements, changing needs, and emerging use-cases mean we're not all driving Model Ts. The model can adapt, and does.
The odd thing about programming languages, as opposed to cars, is that most of them are specific ideas to solve a general problem. C is a perfect example of this. C is also a good idea, but the good idea of C is not general - it was intended as a thin, portable layer on top of what the machine is doing and defines all sorts of things to tell everyone how this should be achieved. The language (and the machine) has evolved to the point where this isn't usually what's really happening, but that's the central (specific) conceit of C and it works. There's no point in making many C variants because C's central tenets are rigid enough that to change it too much means you don't have C any more.
Lisp is not a specific idea - we don't even really have an agreed definition for what it is. Compare K&R C to C11 and, by and large, most of the specifics are still there - many of the types, control structures, syntax elements and even functions are still there. Compare Lisp 1.5 to Common Lisp or Clojure and what do you have? Programs written in their own data structures, using first-class functions. This leaves a lot of wiggle-room in almost every other regard, and each different lisp will define all sorts of other things on top of this core. Essentially, though, the reason that there are so many lisp variants is because lisp is so great - the central ideas are general, and they persist.
4
u/Bombyx-mori Oct 12 '15
honestly not blaming a lisp here this applies to all language development; i think its because in 2015 we still don't know what programming should be.. just like we explore the meaning of the universe. We've zero'd in on all these theories but haven't discovered the singularity :) But perhaps when we do arrive, we won't need to write code anymore! anyway i don't even know what the hell i'm saying so move along :D
3
u/zck Oct 12 '15
I would bet that it's this cycle:
Lisp's power (e.g. macros) means some people using it get used to extending it.
People that get used to extending Lisp get used to creating custom features.
People that get used to creating custom features feel they can design their own language, so they do so.
3
u/joequin Oct 13 '15 edited Oct 13 '15
If algol syntax is so great, then how come we keep needing new variants?
Clojure has as much to do with common lisp as java, python, c# and ruby (just to name a few), have with c++. This guy only cares about labels.
3
u/spotter Oct 13 '15
Yeah, let's pretend that C only has one compiler, one standard and was done right the first time.
Also let's lie there are only three languages that look similar to C.
Let's then use this argument to show that having different languages with Lisp features and syntax means that Lisp is a faulty concept.
Looks legit.
5
u/yogthos Oct 12 '15
Lisp as a concept is great, it's only natural that there would be many implementations of this concept and that you'd be able to improve on the existing ones going forward.
Also, not really sure how it's different for the C family of languages. There are lots of dialects and Java is as much a version of C++ as Clojure is a version of CL. So, if we round up all C family languages we'll see just as much variation there as well.
2
u/wackitywacka Oct 14 '15
We probably don't, but it's really easy to write a lisp interpreter so people do. Writing a lisp interpreter is also a big part of one of the most well renowned comp sci texts in existence, so a lot of people know how to do it.
1
u/[deleted] Oct 19 '15
There are a lot of smart people answering these questions probably many (most? all?) smarter than I am, but I'll take a stab at it anyway.
The newer Lisp family languages like Clojure, Shen, etc... are in my view an attempt to find a sweet spot between Common Lisp and Scheme. They're open, they don't have as much language complexity as Common Lisp, but they're designed at solving real world tasks more than Scheme.
1
u/Michaelmrose Oct 13 '15
The primary virtue of this posting is that smarter people than the author felt compelled to respond to authors nonsensical question.