From: Oleg
Subject: Lisp syntax
Date: 
Message-ID: <acq7ff$pt6$1@newsmaster.cc.columbia.edu>
Hi

I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there 
are many different "defines" where Scheme has just one. Are the reasons for 
this historical or practical?

Thanks

Oleg

From: Eugene Zaikonnikov
Subject: Re: Lisp syntax
Date: 
Message-ID: <680a835d.0205260845.4174858d@posting.google.com>
Hi,

Oleg <············@yahoo.com> wrote in message
news:<············@newsmaster.cc.columbia.edu>...

> I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there 
> are many different "defines" where Scheme has just one. Are the reasons for 
> this historical or practical?

I think there are both.
First, there is an opinion that such a visible distinction between
definitions of certain kinds of objects makes code easier to read.
Then, it is quite hard to come up with a language which can embrace
all emerging, previously unthought paradigms without some interference
with existing constructions and semantics.
Scheme is not an exception here: consider that it has now DEFINE and
DEFINE-SYNTAX, and meditate over LENGTH and VECTOR-LENGTH.

--
  Eugene.
From: Raymond Wiker
Subject: Re: Lisp syntax
Date: 
Message-ID: <86it5a3yz2.fsf@raw.grenland.fast.no>
······@funcall.org (Eugene Zaikonnikov) writes:

> Hi,
> 
> Oleg <············@yahoo.com> wrote in message
> news:<············@newsmaster.cc.columbia.edu>...
> 
> > I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there 
> > are many different "defines" where Scheme has just one. Are the reasons for 
> > this historical or practical?
> 
> I think there are both.
> First, there is an opinion that such a visible distinction between
> definitions of certain kinds of objects makes code easier to read.
> Then, it is quite hard to come up with a language which can embrace
> all emerging, previously unthought paradigms without some interference
> with existing constructions and semantics.
> Scheme is not an exception here: consider that it has now DEFINE and
> DEFINE-SYNTAX, and meditate over LENGTH and VECTOR-LENGTH.

        Consider also that scheme has at least two different
variations of "define" (depending on how you count).

-- 
Raymond Wiker                        Mail:  ·············@fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/
From: Joe Marshall
Subject: Re: Lisp syntax
Date: 
Message-ID: <WC3I8.392$YV2.663790@typhoon.ne.ipsvc.net>
"Oleg" <············@yahoo.com> wrote in message ·················@newsmaster.cc.columbia.edu...
> Hi
>
> I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there
> are many different "defines" where Scheme has just one. Are the reasons for
> this historical or practical?

More namespaces.
From: Erik Naggum
Subject: Re: Lisp syntax
Date: 
Message-ID: <3231409985167754@naggum.net>
* Oleg <············@yahoo.com>
[ trolling ]

  Please, do not feed the trolls.
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.
From: Adam Warner
Subject: Re: Lisp syntax
Date: 
Message-ID: <acqi3d$s714q$1@ID-105510.news.dfncis.de>
On Sun, 26 May 2002 20:49:50 +1200, Oleg wrote:

> Hi
> 
> I'm wondering why CL syntax is more complex than Scheme syntax: e.g.
> there are many different "defines" where Scheme has just one.

That's a poor example of more complex syntax Oleg. Lisp s-notation is just
as simple as Scheme. Both Lisp and Scheme have extremely simple syntax.

Familiarise yourself with some of the operators:
http://www.xanalys.com/software_tools/reference/HyperSpec/

For example read about the difference between defvar and defparameter:
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/m_defpar.htm

   ... defparameter is useful in situations where loading or reloading the
   definition would want to pick up a new value of the variable, while
   defvar is used in situations where the old value would want to be
   retained if the file were loaded or reloaded.

ANSI Common Lisp does have a large number of operators. But you don't have
to learn them straight away (and you can be productive just using a
subset). Most of them can be generated using the building blocks of the
language--and they would be indistinguishable from the built-in operators.
defvar and defparameter that I linked to above are an example of this.
They are macros. Just check out the link above.

With Scheme you may spend time creating functionality that is built into
Lisp.

> Are the reasons for this historical or practical?

Both. Lisp is a practical language and the numerous operators allow people
to work more productively. If functionality is built in you don't have to
spend time defining it yourself.

Lisp also has a long history and operators like `car' and `cdr' would
almost certainly not exist if the language was created today. You have the
choice to call them `first' and `rest' instead.

Regards,
Adam
From: Erik Naggum
Subject: Re: Lisp syntax
Date: 
Message-ID: <3231410891291378@naggum.net>
* Adam Warner
| That's a poor example of more complex syntax Oleg.  Lisp s-notation is
| just as simple as Scheme.  Both Lisp and Scheme have extremely simple
| syntax.

  Not so.  Scheme has no programmable reader.  Common Lisp does.

  Please do not feed the trolls, and more so not with bogus answers.
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.
From: Marco Antoniotti
Subject: Re: Lisp syntax
Date: 
Message-ID: <y6celfwfb07.fsf@octagon.mrl.nyu.edu>
Oleg <············@yahoo.com> writes:

> Hi
> 
> I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there 
> are many different "defines" where Scheme has just one. Are the reasons for 
> this historical or practical?

You must understand that Scheme is an extremely poor language
w.r.t. Common Lisp.

The difference between Scheme and Common Lisp is the following:

Common Lisp uses (roughly) `defun' and `defvar' where Scheme uses
`define'.

Scheme does not have a countepart for

        defstruct (no structures/records in Scheme R^nRS)
        defclass  (no object system in Scheme)
        defmacro  (well, it does, but it is not `define' anymore)
        defgeneric (no notion of generic functions in Scheme)
        defmethod  (no notion of OO in Scheme)
        ... and so on and on and on....

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Joe Marshall
Subject: Re: Lisp syntax
Date: 
Message-ID: <R5QI8.151$fT5.132245@typhoon.ne.ipsvc.net>
"Marco Antoniotti" <·······@cs.nyu.edu> wrote in message ····················@octagon.mrl.nyu.edu...
>
> Oleg <············@yahoo.com> writes:
>
> > Hi
> >
> > I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there
> > are many different "defines" where Scheme has just one. Are the reasons for
> > this historical or practical?
>
> You must understand that Scheme is an extremely poor language
> w.r.t. Common Lisp.
>
> The difference between Scheme and Common Lisp is the following:
>
> Common Lisp uses (roughly) `defun' and `defvar' where Scheme uses
> `define'.
>
> Scheme does not have a countepart for
>
>         defstruct (no structures/records in Scheme R^nRS)
>         defclass  (no object system in Scheme)
>         defmacro  (well, it does, but it is not `define' anymore)
>         defgeneric (no notion of generic functions in Scheme)
>         defmethod  (no notion of OO in Scheme)
>         ... and so on and on and on....
>

MIT Scheme has all of these, but it is not `standard'.
From: Christopher Browne
Subject: Re: Lisp syntax
Date: 
Message-ID: <m3u1osdmbm.fsf@chvatal.cbbrowne.com>
The world rejoiced as "Joe Marshall" <·············@attbi.com> wrote:
> "Marco Antoniotti" <·······@cs.nyu.edu> wrote in message ····················@octagon.mrl.nyu.edu...
>>
>> Oleg <············@yahoo.com> writes:
>>
>> > Hi
>> >
>> > I'm wondering why CL syntax is more complex than Scheme syntax: e.g. there
>> > are many different "defines" where Scheme has just one. Are the reasons for
>> > this historical or practical?
>>
>> You must understand that Scheme is an extremely poor language
>> w.r.t. Common Lisp.

"Impoverished" is probably a more precise word for this...

>> The difference between Scheme and Common Lisp is the following:
>>
>> Common Lisp uses (roughly) `defun' and `defvar' where Scheme uses
>> `define'.
>>
>> Scheme does not have a countepart for
>>
>>         defstruct (no structures/records in Scheme R^nRS)
>>         defclass  (no object system in Scheme)
>>         defmacro  (well, it does, but it is not `define' anymore)
>>         defgeneric (no notion of generic functions in Scheme)
>>         defmethod  (no notion of OO in Scheme)
>>         ... and so on and on and on....
>>
>
> MIT Scheme has all of these, but it is not `standard'.

There are SRFI specifications for a number of thse.

And there are a number of Schemes using the CLOS-like "Meroon" object
system.
-- 
(concatenate 'string "cbbrowne" ·@acm.org")
http://www3.sympatico.ca/cbbrowne/linux.html
"I've seen  a look in dogs'  eyes, a quickly vanishing  look of amazed
contempt,  and I  am convinced  that basically  dogs think  humans are
nuts."  -- John Steinbeck
From: Frank A. Adrian
Subject: Re: Lisp syntax
Date: 
Message-ID: <6yZI8.150$pX1.291921@news.uswest.net>
Christopher Browne wrote:
> And there are a number of Schemes using the CLOS-like "Meroon" object
> system.`

I just took a look at its home page.  It has improved considerably since 
its first version.  It's still only single inheritance, though, but the 
minimal MOP included might let one extend that.  The MOP also seems a bit 
under-powered.  Also, it does seem odd that, with Scheme's insistance on a 
single namespace, the Class and GF/method namespaces were separated from 
the system nmespace. Finally, the whole instantiation issue seems overly 
complex.

If one fixed these issues, it might make sense to add this to Scheme (but, 
if you did the whole job right, you'd just have the original Dylan :-).

faa
From: Joe Marshall
Subject: Re: Lisp syntax
Date: 
Message-ID: <e26J8.1941$fT5.493909@typhoon.ne.ipsvc.net>
"Frank A. Adrian" <·······@ancar.org> wrote in message ·························@news.uswest.net...
> Christopher Browne wrote:
> > And there are a number of Schemes using the CLOS-like "Meroon" object
> > system.`
>
> I just took a look at its home page.  It has improved considerably since
> its first version.  It's still only single inheritance, though, but the
> minimal MOP included might let one extend that.  The MOP also seems a bit
> under-powered.  Also, it does seem odd that, with Scheme's insistance on a
> single namespace, the Class and GF/method namespaces were separated from
> the system nmespace. Finally, the whole instantiation issue seems overly
> complex.
>
> If one fixed these issues, it might make sense to add this to Scheme (but,
> if you did the whole job right, you'd just have the original Dylan :-).

The SOS (Scheme Object System) in MIT Scheme was based on
Gregor Kiczales's Tiny CLOS v 1.2  It has multiple inheritance
and the class and GF/method namespaces are the same as the system
namespace.  The `instance-constructor' procedure is analagous to make-instance
and the initialize-instance generic procedure is analagous to
shared-initialize.  You can run arbitrary code to
compute the effective method of a generic function.

Unfortunately there's virtually no MOP.  Nonetheless it is step in
the right direction.