From: ········@bayou.uh.edu
Subject: Re: Which one, Lisp or Scheme?
Date: 
Message-ID: <5crb69$1fj@Masala.CC.UH.EDU>
Earl & Daniella Harris (········@widomaker.com) wrote:

[Snip]

: Ok.  I don't understand CL.  When I tried to teach myself CL, I was
: expecting a simple language like Scheme.  The details of CL seemed
: overwhelming.  I kept asking myself, why is this SO complicated? 
: This is suppose to be Lisp?

It's so complicated because it's so powerful.  There's so much
that you can do in Common Lisp that there are naturally many
things to learn.  Note however that you can put off learning
many of these things and still write effective programs.
A testament to this fact is that many of Common Lisps'
capabilities can be (or may even be) written in Common Lisp
itself, using a few core primitives.


: IMHO, CL looks like it is much harder to master the Scheme.  The
: following
: is my rebuttal.

Again it's harder to master, but then that's because there is
more to master.  That's like saying "Chess is Harder to
Master than Checkers".  Well sure it is, but that's not
a disadvantage of chess!


: > Then some people try to tell you that CL lacks pattern matching
: > like some other functional language. Not only is it easy
: > to integrate pattern matching, but they don't understand,
: > that for larger software libraries pattern based invocation

: If you need to understand pattern matching to master CL, this is one
: strike
: against CL.  Scheme doesn't have this; it isn't necessary.

Common Lisp doesn't offer pattern matching.  Maybe you should
actually try to learn it or look at it in detail before reaching
such hasty conclusions.


: Why would I want (or need) pattern matching in Lisp?  Is this like
: pattern matching in ML?  Can you use CL and avoid using patterns?

Scheme is basically a tiny version of Common Lisp (this may be a bit
of an oversimplification), so that alone should give you an
idea of what Common Lisp can and can't do.


: > is not very maintainable. Then people begin to tell you
: > that CL does not allow to return "tuples" of values.
: > Again this is easy (use VALUES, or structures, whatever).

: If you need to understand tuples and structures to master CL, this is
: one strike against CL.

Mastery of any language means that you should know the ins and outs
of that language.  Contrast this with being able to effectively
use a language.  With Common Lisp you can effectively use the
language without understanding structures (I don't even know
if tuples are supported).  You can use lists instead of
structures and use them instead.  

Structures however are very simple to use, and very well designed,
and they are there for when you are ready for them.


: Scheme doesn't have tuples; it isn't necessary.  Some scheme
: implementations
: have structures, but you don't need to learn it.

I don't think that Common Lisp even has tuples either, and you
don't have to learn structures in Common Lisp.  Again you've
got lists, just use them.


: Tuples?  Values?  Structures?  If I want to return more than value,
: I return them in a list (or vector).  Why would I want tuples?  

You could do the same in Common Lisp.  


: Are structures like structures in C?  How are tuples different from
: structures and lists?  Are values a new data type in CL?

I can't speak for tuples, and I'm not sure what you mean by
"values", but I can tell you how the structures in Lisp work.

Basically you define a structure (much like you would in C), but
instead of using a "." to access structure fields, Lisp creates
specialized functions -- accessor functions for you to access
the structure fields with.  This hides the implementation details
and makes it a snap for you to later replace them with another
implementation (if you so desire).  Structures in Lisp are
basically ADTs (abstract data types), and so they are like structures
in other languages in that you access particular fields and can
refer to them as a whole, but are different in that they
are abstracted.


: > 
: > Common Lisp is releatively easy to understand. Not
: > full Common Lisp - you don't need to tell them about
: > DEFSETF or about meta classes. But Common Lisp
: > has the same basic properties like Scheme.

: If you have to learn and differentiate between several DEFs, this is
: a strike against CL.

Again you can do a lot (possibly more than Scheme) without
differentiating between several DEFs.  Again, think of Scheme
as a tiny subset of Common Lisp.  With Common Lisp, you can 
choose to use a tiny subset, and so it can be very much like
Scheme (in terms of simplicity).  No one is forcing you to
use all these features, but they are there for when you
need them.


: While scheme has essentially "define,"  Common Lisp has several
: "DEFsomethings".
: Why does Common Lisp have some many definitions?

Because they do different things.  Again you are not forced
to use all these definitions.  


: If you need to understand "meta classes" to master CL, this is also
: one strike against CL.

The same answers apply, let's just fast forward since this is
redundant.

[Snip]

: Scheme's printing options are much clearer to me.  You apply the
: print function to the value and it prints it.

: CL has really exotic print functions with lots of flags and options.
: It reminds me of C's print function.  There are more details.

Again use what subset makes you feel comfortable.  Scheme is simpler
because it's *WEAKER*.  Get it?


[Snip]

: I'm not sure a libary makes a language easier to master.
: A libary can be a convenience to the programmer.  It saves
: me the trouble of writing some programs.

Think of much of Common Lisp as optional libraries for you
to use when you decide you need them.


[Snip]

: Regarding the evaluation model, CL's doesn't treat
: functions as first class objects.  I can't pass functions
: around like other values (numbers, lists, etc).

Yes you can.  The thing is with Common Lisp (as contrasted
with Haskell), you'll need a special quoting notation
to keep things clear, but that's it.  

That's how functions like funcall and apply work, by
taking functions as arguments.  If you couldn't do that
in Common Lisp then how do these functions even exist?


: I bet CL is really easy to master, when compared to C++.

: However, IMHO, it is hard to defend that CL is easier to
: master than Scheme.  Just compare the reference manual size.

I'm not arguing that CL is harder to master than Scheme, I'm
merely trying to point out that mastery is one thing, and
using something productively is another, and you can use
CL productively without all that much effort.


: In CL defense, one could argue that CL has other advantages over
: Scheme.  I bet it is easy print out a number in hexidecimal format.

That was uncalled for.  Common Lisp is vastly more powerful than
Scheme and is therefore larger.  It's that simple.  If you can't
come to grips with this simple fact, then maybe Common Lisp
really is beyond you and you should stick with something simpler
like Scheme.  


[Snip]

: Earl Harris Jr.

--
Cya,
Ahmed

In order to satisfy their mania for conquest, lives are squandered
	Discharge