Hacker News new | ask | show | jobs
by blackrock 2234 days ago
It was Einstein that said, “Everything should be made as simple as possible, but not simpler.”

I think the problem with Lisp, is that it violated this principle.

It has a lot of strange little constructs. It came from a time when programmers tried to type as little as possible. In doing so, the language adopted all these little quirks. I’m not saying it’s bad, but it’s just different.

Whereas the human mind is a simple graphical machine, and we like to see associations. Like, the usage of an equal sign, to see that we’ve made a variable assignment. Maybe this reaches back to our childhood algebra days, where we associate equivalence with an equal sign. Who knows.

But Lisp did away with all that. It created its own style. It gave us parentheses to enclose our statements, which is to be honest, actually a nice feature. But it forced us into knowing the specific ordering, sequence, and symbols in order to make a legal statement.

Anyways, I like Lisp, and have always been wanting to use it for something. But not quite sure what.

It’s great for writing short macros in Emacs though. You can write a multi line function, then compress it back into a single liner, because of the parentheses. This helps keep your config file short.

It doesn’t really work for video game programming, as it doesn’t seem to have the libraries for it. It’s not as fast as C for speed critical applications.

It kinda lives in that medium realm, where internal business applications can use it for internal business processing, that can run uninterrupted for decades. But, this space is where Python excels at.

Anyways, one day, I’ll finally create that programming language idea of mine, and it’ll be some fusion of Lisp and Smalltalk, but can run almost as fast as C.

1 comments

Some implementations (e.g. Common Lisp) have legacy oddities in them for back compatibility but newer implementations like scheme tend not to. Instead of CAR and CDR they have first and last, for example.

Emacs lisp is quite slow but adequate for purpose. You can write very high speed numeric programs in Lisp — another book by Sussman was on HN the other day and it’s all about physics, all written in scheme. The fact that code is data allows lots of complex optimizations that are harder or impossible to represent in c

I think you got this backwards. Common Lisp does have `first` and `rest` as synonyms for `car` and `cdr`. As far as I know, Scheme does not. I believe you have to use `car` and `cdr` there (unless, of course, you define your own synonyms).

I could be wrong about Scheme: My Scheme knowledge is badly outdated, and was always incomplete.

Racket has `first` and `rest`. I just tried it. But I tried an online scheme interpreter and it did not have it.
first and rest are in racket, but racket has many things not in scheme (and doesn't have some things that are.) If you use the r5rs #lang (e.g. `racket -I r5rs`) you'll see that it doesn't have first and rest.

Also, first and rest in racket aren't synonyms for car and cdr. car and cdr take pairs, while first and last only take lists. Try this: (car '(1 . 2)) and (first '(1 . 2))

Strange, CL has first, rest, car and cdr.

Scheme R7RS small has only car and cdr.