Live data from Hacker News

On Lisp

paulgraham.com

31–40 of 107 posts

Re: On Lisp

#33
post #30
post #16

Lisp is a dangerous language that shouldn't be taught or used these days. There are plenty of superior programming techniques. Mathematical programming - linear programming, finite domain constraint programming, constraint logic programming, logic programming, relational programming Static functional programming - ml, haskell A good modern introduction to programming is Concepts, Techniques, and Models of Computer Pr…

What kind of argument is this. > constraint logic programming, logic programming The book you comment on actually implments a logic programming system. Both common lisp and clojure have implmentations of high performance logic systems. > Static functional programming Both Clojure and Common Lisp have type systems that can do most things ml and haskell can do. Its arguable that some of this (in the CL) are even more p…

But that's not the main style of programming. If you teach someone lisp he'll hack around with functions and macros and not realize that his problem could be elegantly written in constraint programming.

Most of the time the majority of code (written by good programmers) is in constraints or relations, so why encase that in a functional language with parenthesis everywhere (I've programmed a fair bit in lisp and don't mind parenthesis at all, but it get's annoying after you're used to the elegance of prolog syntax).

Re: On Lisp

#34

Earlier quoted context omitted.

It is written to a prior version of the Common Lisp standard, and with a very old-fashioned style. You'll see calls like (REPLACA pair val) instead of (SETF (CAR pair) val) and so on. That will irk you if you are a Common Lisp hacker already. If you're not, just keep in mind that good CL style results in somewhat prettier code than that in On Lisp.

I tried reading this back when I started writing lisp- and it's been a year since. I know I got stuck when I couldn't find functions in slime with C-d C-h, and just assumed that they were defined by the book. This is much more reassuring.

REPLACA and its cousin REPLACD are part of the Common Lisp standard, but they are indeed something you should probably never see. Even for mapping across a structure or something I'd prefer to write my own inline function. They along with TERPRI (newline) are the ugliest function names of CL.

Re: On Lisp

#35
post #27

What percentage of the techniques in this book are also applicable to Clojure programming? I don't know a lot about how the two macro systems differ.

On Lisp is great for learning about macros, and what is possible.

That being said, what is idiomatic in CL is not necessarily idiomatic clojure. For example, pg tends to like anaphoric macros, (http://en.wikipedia.org/wiki/Anaphoric_macro), while Clojure tends to eschew them.

Re: On Lisp

#36
post #23
post #11

OT how is arc progressing?

The Clojure inventor (Rich Hickey) took most of the good ideas from arc and all the arc enthusiasts have pretty much changed horses long ago to Clojure. I think arc still has some good points related to code brevity that noone else has fully duplicated yet.

No. Clojure's first public release was before Arc's first public release. Rich was also working on Clojure for two years before release.

Re: On Lisp

#38
post #30
post #16

Lisp is a dangerous language that shouldn't be taught or used these days. There are plenty of superior programming techniques. Mathematical programming - linear programming, finite domain constraint programming, constraint logic programming, logic programming, relational programming Static functional programming - ml, haskell A good modern introduction to programming is Concepts, Techniques, and Models of Computer Pr…

What kind of argument is this. > constraint logic programming, logic programming The book you comment on actually implments a logic programming system. Both common lisp and clojure have implmentations of high performance logic systems. > Static functional programming Both Clojure and Common Lisp have type systems that can do most things ml and haskell can do. Its arguable that some of this (in the CL) are even more p…

> Both Clojure and Common Lisp have type systems that can do most things ml and haskell can do.

I don't know about that, Haskell has quite a few very non-trivial extensions in it's type system that I have yet to see replicated outside of research languages. ( Rank-N Types, GADTs, Kind polymorphism, etc).

Re: On Lisp

#39

I've been meaning to read this for quite some time, but I've been told that the idioms and coding style is outdated, or not very good. This isn't going to stop me, but I'd like to know from some experienced lispers what problems I might encounter. Especially as I'm pretty inexperienced myself. I definitely won't know what to look for.

I think both On Lisp and ANSI Common Lisp from PG are good books.

The only criticism I have is that PG does not write code in "Common Lisp style". It's often more of Scheme with Common Lisp.

Re: On Lisp

#40
post #16

Lisp is a dangerous language that shouldn't be taught or used these days. There are plenty of superior programming techniques. Mathematical programming - linear programming, finite domain constraint programming, constraint logic programming, logic programming, relational programming Static functional programming - ml, haskell A good modern introduction to programming is Concepts, Techniques, and Models of Computer Pr…

Just upvoted you for "Lisp is a dangerous language that shouldn't be taught or used these days.". You just made a huge number of people curious and willing to learn more about Lisp by saying that :)

Jokes aside, the Van Roy book is something to add to my "to read" list. Try posting it again in a comment that doesn't get downvoted to hell, maybe others will notice it too.

Post reply on HN