Live data from Hacker News

Why is Common Lisp not the most popular programming language?

daninus14.github.io

111–120 of 339 posts

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

#111
post #7

It's the lists. No, not the prefix notation, parenthesis, what have you, although that doesn't help. The lists themselves. In Lisp, code is data, and data is lists. Yes, of course, there are hashmaps, arrays, strings. But idiomatic Lisp code really does use linked lists extensively, it's an entire style of programming. Even if you'd prefer to use different data structures (and again, Common Lisp does support this ),…

I disagree. I have no problem with lists obsession in other languages like OCaml. The parentheses are just too much. I get how elegant and unambiguous they are for computers but I am not a computer. It's like RPN. It's elegant and easy for code to parse and unambiguous and all these nice things.... except it isn't easy for me to parse. Compilers are perfectly capable of compiling readable code like Rust so I don't se…

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 Lisp.

There are certain things that languages can do that make syntax easier; for instance, Clojure's default constructs reduce a lot of parens compared to CL by using brackets [] and removing nesting. For instance

    ;; clojure
    (defn sum-and-square [a b]
      (let [sum (+ a b)]
        (* sum sum)))

    ;; common lisp
    (defun sum-and-squaer (a b)
      (let ((sum (+ a b))
        (* sum sum)))
This leads some people to assert (with other reasons too) that Clojure is not in fact a "lisp."

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

#112
post #100
post #64

Earlier quoted context omitted.

For simple stuff, sure. Try -b±√(b²-4ac))/2a. Or anything complicated really. You end up counting parenthesis, writing down intermediate values, and just blowing it and starting over. It's really nice to have something complicated, being able to sanity check intermediate values, and having a visible stack made things crazy easier. I had friends in high school, for anything non trivial they would call out "anyone get…

> For simple stuff, sure. Try -b±√(b²-4ac))/2a. Or anything complicated really. In anything complicated and long is where RPN shines the brightest! If it's 2+2 I don't care whether I type 2+2 or 2 2 +. But for long complex equations, give me RPN every time. All my calculators are set to RPN mode (if it doesn't have RPN mode, I'm not using it). I know it takes a bit of getting used to, but once you do it is a huge adv…

Indeed, great for speed and correctness.

It also makes awesome use of a multiline display, even an extra 3 lines to see the stack is a game changer. Without RPN I just use the extra area for graphing.

It's especially useful for unit conversions, since with prefix you never see the intermediate values.

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

#113
post #107
post #7

It's the lists. No, not the prefix notation, parenthesis, what have you, although that doesn't help. The lists themselves. In Lisp, code is data, and data is lists. Yes, of course, there are hashmaps, arrays, strings. But idiomatic Lisp code really does use linked lists extensively, it's an entire style of programming. Even if you'd prefer to use different data structures (and again, Common Lisp does support this ),…

I didn't see mentioned in the thread (maybe missed it) the #1 reason, IMO, that Lisp can't be popular in companies. Everyone should take the time to learn Lisp and do a handful of personal projects with it. It'll help your growth as a software engineer. Just do it! But that doesn't make it a great corporate language. Lips is infinitely flexible, you can mutate it to be what you want. That's cool and feels awesome. Al…

> Simple, not very flexible, everyone does it the same way mostly, you can plug & play developers like scrum demands we do.

I think that's why Python beat Ruby. :p

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

#114
post #24

The same reason as why Esperanto is not the most popular spoken language. It's historical reasons and network effects.

No, it's difficult to read and understand. It's a parenthesis circus. For example - https://github.com/dimitri/pgloader/blob/master/src/pgsql/pg...

Esperanto is difficult to read and understand. It's an accent circus.

I'm having fun with Typescript these days, but parentheses are what I miss most from my Scheme days. They're objectively better.

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

#115
“It’s the macros, Stupid!”

Seriously. Macros have to be understood a priori to be readable. Macros make the cognitive load of the language very heavy.

Contrast that to Ruby which can do rich DSL without macros. It’s much easier to read and figure out even when it gets complicated.

Lisp is a beautiful language. But it hits a wall. Macros were made to hop that wall, but ultimately hurt the language.

I think this can be fixed with pattern matching and perhaps types, but it will take a very smart programmer to pull it off and it will take Lisp in a direction that old die hards are probably uncomfortable with.

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

#116
post #107

Earlier quoted context omitted.

I didn't see mentioned in the thread (maybe missed it) the #1 reason, IMO, that Lisp can't be popular in companies. Everyone should take the time to learn Lisp and do a handful of personal projects with it. It'll help your growth as a software engineer. Just do it! But that doesn't make it a great corporate language. Lips is infinitely flexible, you can mutate it to be what you want. That's cool and feels awesome. Al…

> Simple, not very flexible, everyone does it the same way mostly, you can plug & play developers like scrum demands we do. I think that's why Python beat Ruby. :p

Agreed. And why I love Ruby and hate Python. But yes.

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

#117

I started learning Lisp recently. The text I was reading said people complain about the parentheses and I see a number of people stating that here. But that is not a problem when you have an editor that understands lisp and keeps track of all that for you. Just focus on the code and the editor will take care of the parentheses for you.

Agreed. At least you can see the parenthesis. and seriously, what is the mental difference between say (print 'hello') and print('hello'), for me the first is easier. They both have the same number of parenthesis, but in the first I can see all the operations that go together. Hating python every time I use it. Python is lies all the way down. "You don't need curly braces or anything to mark your code blocks, only in…

> foo = ("a very" "long" "string")

> is valid python, and so is foo = ("a very", "long", "string")

> but they give different results.

That's because the former creates implicit string concatenation, while the latter is 3 distinct strings.

FWIW, while I love Python, I think implicit string concatenation is a huge anti-feature. It is a source of bugs and breaks the Zen of Python which states that explicit is better than implicit.

Your first line should by a syntax error, as far as I'm concerned.

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

#118

Earlier quoted context omitted.

Python != Crappy code. Lisp != good code. You can write crappy code in any language. My experience is that it is much less expensive to maintain Python in a team environment in the long run. People aren't tempted to create their own personal "domain specific languages" in Python. Lisp kind of encourages that.

I'm not saying Python is always crappy. It's just easier to create crappy code in Python, due to dynamic typing, rampant side effects, null values, OO madness, etc. If your team has the discipline not to do that, great.

> dynamic typing, rampant side effects, null values

I’m afraid these are also problems in Common Lisp.

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

#119
post #50

Because most programming is done by people trying to do a job and it requires broad tooling support and familiarity, LISP is a language that has neither. LISP, (similarly to Haskell) requires you to bend your mind and pay an upfront mental cost in order to access it's benefits, which are that everything is equally easy to describe. No construct in LISP feels like it requires you to bend the language in an awful way b…

Rust requires people to learn how to adapt to Rust’s borrow checker, which can be challenging for programmers coming from other languages, yet this hasn’t stopped Rust’s rapid adoption in systems programming. In fact, Rust’s safety features are Rust’s selling point. Of course, it helps that Rust came from Mozilla and that it’s used in Firefox. Other than Grammarly and some internal Google products, I don’t know any m…

I find that borrow checked in Rust is the easiest part of the language to get used to. Lifetimes on the other hand seem unnecessary in 99% cases where compiler forces you to use them - why can't it just assume that all the required parts have the 'a and complain if something violates that? Event bigger issue is all the missing features that most other languages have - overloaded functions (they kind of exist in generics), ranged integers, arrays indexed by enums, full support for type aliases, some level of inheritance, even if it was the go style, would make Rust much much easier to use.

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

#120
post #86

A lot have already been said about it: +Lisp Lost the train of microcomputers. They were "toy machines" that needed low level programming like assembly or forth or later C to do anything remotely similar to what Mainframes could do. +Common Lisp is a mess, a compromise, like Deutsch (a language created to take something out of every variant dialect), designed by committee language. Better (opinionated, created by a p…

> Lack of access to the C libraries.

Isn't CFFI enough for that?

Post reply on HN