Hacker News new | ask | show | jobs
by Novash 6113 days ago
I never tried Scheme so you can assume I am talking about CL if that helps, but since I don't know the difference between them, the question is directed at both.

In fact, if they are both 'Lisp', why do they exist at all? Why there ARE differences? If CL is a 'very good' ANSI standard as you say, why people use Scheme? Arc is also CL, but why does it exist at all? What does it has that justifies it being created, increasing even more the noise? If I wanted an implementation of strict CL, which one would be it?

3 comments

Common Lisp was an effort to create an unified, "industrial strength" version of Lisp, because at the time there were many. For this reason the resulting standard is very large and complex. Scheme has been designed with a different agenda (cleanliness, elegance, etc.) and it is more used in the academia ; for example, scheme is the dialect used in the famous SICP book.

If you choose CL, the choice of implementation is not very important while you learn it. Different CL implementations have different strength, e.g. in unicode implementation, compilation speed, treatment of certain kinds of numbers etc., but it is not relevant for a beginner. A popular open source choice is SBCL, but there are others.

Also, there are free/opensource implementations and commercial implementations. The commercial ones are costly (but trial versions exist); they give a more complete environment.

And even though Scheme was designed to be clean and elegant, CL has to be backward compatible and thus cannot be 'cleaned', right?.

Is there any 'cleaner' CL standard, or at least a 'best practices' guide to code in a cleaner way, avoiding the worse pits that had to be kept in the standard due to backward compatibility?

I can give you a simple C++ example of what I mean. In C, you had those *parameters that had to be matched by &args when the function was called. C++ brought some self-referencing &parameters that were passed normally and worked the same way than the former but were (saidly) less error-prone.

Is there any similar effort being made in Lisp?

The "backward compatibility issue" means simply that the Common Lisp is a very large language, so it is slightly more scaring at first. Also, some things are strangely named for historical reasons.

Regarding scheme vs CL, I don't want to start a flame war, I like both languages. It seems to me that CL is more dirty-hands, product-oriented and agnostic, while Scheme is sort of a beautiful thought experiment, meant to teach things. [Yes, I know you can code practical things in scheme too]

CL gives you more rope to hang yourself with macros. Which is a things that most hackers appreciate, anyway.

There aren't many style guides on CL, but Peter Seibel's book is a good start. But in the end I think you should try to play more with code and worry less about lisp theology :)

That's exactly what I am trying to do. but I am hearing all those omens about Lisp but I sense I need to understand it better before I dive myself into it. There is absolutely NO market for it where I live so, if I would learn it, it would be for personal gain. Not that it is a problem, but without a market compass, I feel like I need a map.

Thanks for your answers.

(This is from my personal experience, your mileage may vary) Scheme and CL have different goals: Scheme aims for a quite minimal language with additional abilities primarily through libraries (part of the reason that it is often seen as a teaching language, the core can be learned quite quickly), CL seeks to be a more general purpose language, so it standardizes more features and abilities. Also, Scheme seems to emphasize functional programming more.

The choice of a Lisp seems to be one of situation, context, or religion (for example, see the disagreements as to whether a Lisp-1 or Lisp-2 is better).

Arc may just appear to be an attempt to build a better mousetrap (and is not CL), but it seems to be inspired by the same reason that created most other programming languages: someone (pg) decided that there existed a better way to do task x. I, for one, think that the syntax is cleaner.

I'm usually a Schemer, so I can't really recommend CL implementations...

btw, arc is /not/ CL. It is another kind of lisp. As I understand it, arc is lisp as PG thought it should be. Other currents of thought exist.