Live data from Hacker News

Why is Common Lisp not the most popular programming language?

daninus14.github.io

281–290 of 339 posts

Re: Why is Common Lisp not the most popular programming language?

#281
post #182

Earlier quoted context omitted.

I think it's as much about familiarity than anything else. I've programmed full time in Clojure for the last 6 years, and I find it just as easy to read than other languages I'm familiar with (JavaScript, Java) and way less easy to read than other languages like Haskell or OCaml that have their own syntax lineage. I'm sure if I spent an amount of time becoming familiar with them, I'd find them just as easy as I do Li…

;; common lisp (defun sum-and-square (a b &aux (sum (+ a b)) (* sum sum))

    ;; clojure
    (defn sum-and-square [a b] (let [sum (+ a b)] (* sum sum)))
Honestly, I'm not sure what you're trying to show.

Re: Why is Common Lisp not the most popular programming language?

#282

Earlier quoted context omitted.

I definitely include linters, not just style formatters. > It happens even in fairly rigid languages like Java, I can't imagine what you'd end up with Lisp. I imagine it would be about the same, with human factors dominating. If Lisp's flexibility pushed in the direction of inconsistency, the ease with which you could write codemods for Lisp would push in the direction of consistency. > Has there ever even been any L…

While ITA no longer exists as a separate entity I don’t think, my understanding is that they pretty much wrote everything in Lisp. https://en.wikipedia.org/wiki/ITA_Software https://franz.com/success/customer_apps/data_mining/itastory... Grammarly too, although I don’t think it qualifies as a 20-year codebase: https://www.grammarly.com/blog/engineering/running-lisp-in-p...

ITA started doing everything in Lisp, but especially as the original coding founder left, started hiring people doing stuff in Perl, Python, Ruby, Java, shell, C++, PL/SQL, etc.

The core software was still Common Lisp, but lots of cruft got added, and Conway's Law kicked in mightily.

Re: Why is Common Lisp not the most popular programming language?

#283
post #192

Earlier quoted context omitted.

Ruby is "perl-esque" in syntax, and of course TIMTOWTDI is opposite to the 13th item of the Zen of Python, so it's understandable some dislike to an express design decision. But hate ? Really?

> But hate? Really? Yes; well maybe hate it a strong word reserved for life and death matters, but I intensely dislike python. It's like nails on a chalkboard reaction for me. It drives me crazy that it has become popular.

Wow. I feel that way with C# and Java, but mostly without any reasons I can rationally articulate. Meanwhile, I love Python!

Re: Why is Common Lisp not the most popular programming language?

#284

Earlier quoted context omitted.

A Python list is an ArrayList/vector, not a linked list. CL lists are linked lists of cons cells.

Correct. There's no such thing as a python a-list, or p-list, and they can't share structure. There's overlap between programming in Python with lists, and programming in Lisp with lists, but not as much as it appears. In idiomatic Lisp, it's rather common to search a list for a value, cdr it, and cons that cdr to the collection you're building up. Python has nothing like that, because what I said makes no sense in t…

Iterators can be shared in Python e.g., here's a well-known grouper recipe (traverse `it` iterator in chunks of `N` items each):

     zip(*[it]*N)
Example:

    >>> L = [1, 2, 3, 4]
    >>> *zip(*[iter(L)]*2),
    ((1, 2), (3, 4))
Here's the single result of the iter() call is shared. The purpose is to show that iterator can be shared in principle (ignore other aspects of the code).

Re: Why is Common Lisp not the most popular programming language?

#285
post #205

Earlier quoted context omitted.

He was so often frustratingly right, too.

I particularly remember an extended rant that Lisp == Common Lisp, and Scheme is not Common Lisp, and therefore Scheme is not Lisp. I’m oversimplifying—Erik gave specific reasons—but that’s what it amounted to. Derailed an entire conversation, IIRC.

That's one thing where he was right.

Re: Why is Common Lisp not the most popular programming language?

#286
post #182

Earlier quoted context omitted.

;; common lisp (defun sum-and-square (a b &aux (sum (+ a b)) (* sum sum))

;; clojure (defn sum-and-square [a b] (let [sum (+ a b)] (* sum sum))) Honestly, I'm not sure what you're trying to show.

I'm not sure what you are trying to show? Code can be in one line? Okaaaaay...

I was trying to show that one can define local variables without adding another list level via let.

Like if one would/could write in Clojure:

    (defn sum-and-square [a b &blah sum (+ a b)] (* sum sum))
Another Common Lisp example, we'll stick to your one liner format, using infix syntax via a reader macro:

    (defun sum-and-square (a b) #I(sum=a+b,sum*sum))
Before you ask: what am I trying to show? This shows that Common Lisp syntax can be deeply extended by the user and that this is a standard feature of the language. Want a shorter infix notation without s-expressions? Why not...

Re: Why is Common Lisp not the most popular programming language?

#288

It's the learnability of the language. Remember BASIC? You could show someone a FOR ... NEXT loop and they would completely understand. After a couple more 10 line programs and you can safely hand over the keyboard and handle the "how do I?" questions You had to show very little before they understood. Now try Lisp ... M: This is a list S: What can I do with it? M: By itself nothing but trust me it is important. This…

I don't know why you're being downvoted; I completely agree with this. It's hard to put your head into the mindset of a beginner after it's been in the deep end of the pool for so long. Stuff needs to make sense now and in isolation rather than an ever-growing stack of items that will be explained later. It's a matter of putting stakes in the ground and building incrementally. One could argue that lists and heads and tails do make sense on their own and isolation, but they're maybe not the right primitive, because all the things that beginners might want to use "intuitively" have to be first built out of lists. Lisp is a reductionist language, and that's not good for beginners.

Readable code needs to be not subtle, low on magic, and self-explanatory. The last one is hard to quantify and make objective, but is imperative in making an approachable language.

Re: Why is Common Lisp not the most popular programming language?

#289
Languages that insist on prefix function syntax (`(f 'a)` instead of `('a f)` or `'a.f()`, etc) are always going to be less popular because it reduces the number useful possible suggestions an IDE or REPL can make to a programmer typing a program. You have to know what functions you want to call and the IDE can "fill in the blank" with arguments that are in scope. But you need magic to get the IDE to tell you what functions you can call on an argument.

Julia suffers from this too, fwiw. Multimethods in general can be strange but useful beasts, but I don't know of any IDE that handles them well. And sure C does this too. But C isn't exactly the model of useful language that lets a programmer dynamically explore what programs they can compose, is it?

Normally, I think most syntactic arguments against languages are bad. But having written in fancy PLs that don't have any kind of postfix/method syntax and those that do, as well as writing language servers and compilers, this is the one syntactic thing I feel very, very strongly about.

LISP will always suck for beginners because in Python and C++ and Rust and Swift (etc) they can add "." to the end of a value and the IDE will remind them what methods they can call, or explore what's available. The IDE can even weight which things to suggest. Other people talk about package managers and ecosystem and so on, but this one syntactic choice is something overlooked by many people when talking about how languages grow userbases. Don't overlook it.

Re: Why is Common Lisp not the most popular programming language?

#290

Earlier quoted context omitted.

I doubt it :D https://gist.github.com/vindarel/15f4021baad4d22d334cb5ce2be...

There isn't a language where you can't find a ragequit file. The Common Lisp ones are absolutely savage.

You are right :) This file is primarily for the ones who rage quit CL, hoping for greener grass elsewhere (and eventually come back).
Post reply on HN