Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
newbie asks: why CL rather than scheme? (Dr N. and Mr N)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 101 - 125 of 139 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Janos Blazi  
View profile  
 More options Dec 22 2001, 3:03 am
Newsgroups: comp.lang.lisp
From: "Janos Blazi" <jbl...@hotmail.com>
Date: Sat, 22 Dec 2001 09:06:35 +0100
Local: Sat, Dec 22 2001 3:06 am
Subject: Re: newbie asks: why CL rather than scheme? (Dr N. and Mr N)

> I was thinking maybe "reverence"?

Yes, sorry.
J.B.

-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "newbie asks: why CL rather than scheme?" by Robert Strandh
Robert Strandh  
View profile  
 More options Dec 22 2001, 3:40 am
Newsgroups: comp.lang.lisp
From: Robert Strandh <stra...@labri.u-bordeaux.fr>
Date: 22 Dec 2001 09:39:51 +0100
Local: Sat, Dec 22 2001 3:39 am
Subject: Re: newbie asks: why CL rather than scheme?
k...@shore.net (Kurt B. Kaiser) writes:

> Tim Wilson <timw_em...@NOSPAM.yahoo.com> writes:

> There must be many thousands of students being exposed to Lisp via Scheme each
> year, and this number is increasing.  Part of that tradition is to understand
> Scheme well enough to do a (simple) implementation.  This _has_ to be be a win
> for the Lisp community, because it promotes a Lispy way of thinking about CS.

I am afraid this is contrary to my experience.  

Years ago we taught programming using Scheme here at the University of
Bordeaux, and they still do in the Engineering School.  A few years
back, we replaced Scheme with Common Lisp.  It is now taught to the
fourth-year students.

My experience with teaching programming Scheme was that students
perceived it as not being credible.  They didn't buy the argument that
it is possible to have a fast implementation while at the same time I
couldn't point to one.  They also weren't convinced that Scheme is a
good language since it is small, but then each implementation adds
mutually incompatible extensions for things like object orientation.
And they couldn't understand why such a supposedly great language
couldn't be found in any commercial product whatsoever.

Perhaps your students are better than mine, but the ability to write a
simple implementation of Scheme in Scheme did not impress them,
probably because they had nothing to compare with.  In addition, for
an implementation to be useful, as opposed to be a pedagogical toy, it
would have to do quite a lot more, including optimizations that can be
quite messy.

At the end of the course, they were left with the impression that
Scheme is a language that is:

  - unreadable because it has lots of parentheses that serve no
    credible purpose,

  - slow, because it is always implemented in the form of an
    interpreter,

  - useless, since used only to implement itself, and has to be
    extended to do anything useful, and

  - not used for any real purpose, so irrelevant to their future as
    developers.

I found myself getting tired of spending a lot of time compensating
for these opinions.  I wanted to be able to give a clear answer to
most of the doubts that students may have about the language I chose.

In listening to myself arguing in favor of Scheme, I found that my
arguments didn't sound convincing, and decided to take a deeper look
at the reason why.  To make a long story short, I realized I wasn't
convinced myself.  Then I (re-) discovered Common Lisp a few years
ago.  I realized that it would provide answers to all of these
doubts.  I therefore started teaching a programming course based
entirely on Common Lisp.

Now that I use Common Lisp, things seem to work much better (at least
that is what I tell myself; perhaps some of my students reading this
can confirm or deny this).  

The parentheses are seen as a way for the CL programmer to think
directly about the internal representation instead of the surface
syntax, and doing that is a prerequisite for writing macros.  There is
no doubt about speed (we are using CMUCL).  The language has more
stuff than they have ever seen before, such as bitwise operations on
arbitrary-precision integers (beats C), CLOS (beats Java and C++),
macros (beats everyone), ratios, highly integrated complex numbers,
first-class functions, and more.  I can truthfully say that CL is used
in real applications (and difficult ones).

In addition, I can point to books (PAIP, Sonja Keene's book, Graham's
books) that solve real problems in a way that the recognize as a
substantial improvement of any methods they can imagine using
languages they already know and I can truthfully say that the authors
of these books are excellent programmers (as opposed to being just
university professors with no programming experience) having written
real-wold applications.

While I know that the majority of my students don't "get it" at the
end of my course (but the situation is no worse than in any other of
our courses), at least (I hope) they get the impression that
programming can be substantially improved by the use of Common Lisp,
even though they are not (yet) able to be part of such a task.  This
is a considerable improvement from Scheme.  In the end I hope (and I
have seen evidence of this) that when they are faced with a difficult
programming task later in life, they will remember that there is a
better way of doing it, and look back at the course, the teaching
material, and the books.

> Then when those kids gain the confidence to do something big, CL is waiting!
> Enough of the internecine warfare! Just tell them, "OK, people, now you're
> ready to come over to the big time, welcome!"

I don't buy this argument.  There is no intrinsic value in using a
different language for doing small things if the ultimate purpose is
to teach them how to do big things.  There would be a reason to do
that if Common Lisp somehow made things harder to explain, and if
there were no other inconveniences with Scheme.  But I do not think
that is the case.

For those who read French, please consult my web page for the course
at:

http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/MTP/2001-2002/...

--
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Janos Blazi  
View profile  
 More options Dec 22 2001, 4:04 am
Newsgroups: comp.lang.lisp
From: "Janos Blazi" <jbl...@hotmail.com>
Date: Sat, 22 Dec 2001 10:07:58 +0100
Local: Sat, Dec 22 2001 4:07 am
Subject: Re: newbie asks: why CL rather than scheme?
Now this posting shows again, dear Erik that it was again Mr. N who was
responsibille for (or of?) your answer.

> | On the other hand, for the uninitiated, CL is pretty baroque [...]

>   Of course you are a Common Lisp non-fan.  Who could have _guessed_?

CL is baroque and this is not an attack, it is a desription. Baroque stands
for several things but here it stands for "rich of features". Important
achievments of human culture (for exmple CL or a novel by Thomas Mann) are
rich and therefor they are difficult to understand. The problem is, due to
your rude attitude towards üpeople you have been under attack all you life
and you cannot even imagine that there are people who do not attack you. (It
is selfconceit as well, because there are more important thing than you.)

> | There must be many thousands of students being exposed to Lisp via
Scheme
> | each year, and this number is increasing.

>   They are not exposed to Lisp when they are exposed to Scheme.

Now you are repeating yourself.

> | This _has_ to be be a win for the Lisp community, because it promotes a
> | Lispy way of thinking about CS.

>   No, what it tells people is that the most important feature of "Lisp" is
>   that professors get to annoy students with a stupid exercise to
implement
>   the language in itself.  Scheme is a stupid, stupid thing to teach
people
>   who want to _program_.  It is even more harmful to teach people who want
>   to do research.  It is yet more harmful to teach people who do not want
>   to write programs for the rest of their lives.

You simply do not know how students respond to their lectures. But many
students simply do not know what they will face at university and are
disappointed by the rigor and the necessity to *think*, so their frustration
would be even more profound, if the started with CL (though I only suspect
this).

> | Then when those kids gain the confidence to do something big, CL is
> | waiting!

>   This is just plain wrong.  Is MIT Scheme implemented in Common Lisp?

Why not?

What a strange idea. I always thought Scheme was created before CL was
around! Am I wrong?

> | Enough of the internecine warfare!

>   Go back to your Scheme cave and the warfare will at least quiet down.

Your proverbial rudeness again. It makes your arguments less convincing.

> | Just tell them, "OK, people, now you're ready to come over to the big
> | time, welcome!"

>   There is an old joke about which platform Oracle ran best on (35 mm
slide
>   projector), but I think it might need to be revised:

>   Q: Which platform is best for running Scheme?
>   A: A blackboard.

Now I admit that this remark is witty.

>   As long as Scheme is marketed as a Lisp, it must be fought by every
other
>   Lisp.

What a nonsense!

>   Scheme may be closer to the "roots of Lisp", but if you want to
>   write your project reports in the language of Beowulf, or Shakespeare,
>   expect to be unemployed.  Scheme is one of the strongest reasons people
>   who have a fraction of a degree in computer science loathe Lisp and hate
>   parentheses.  For _real_ programmers who want to use large languages so
>   their code can be small instead of re-implementing small languages and
>   their own large libraries, Scheme is a silly toy, and it taints the
whole
>   Lisp family with its silliness.

>   _Maybe_ if Scheme was taught differently and would be so kind as to
avoid
>   communicating bad things about the entire Lisp family, it would not be
so
>   bad.

Again, you do not know how "Scheme is taught". There are bad teachers and
their teaching will be bad even if they use CL.  A teacher who tells hist
students that a class system is unnecessary (to quote Kent Pitman) is an
idiot. But if a teacher tells his students that using classes is *the* right
was of programming, he is an idiot as well becaues there are problems where
you prefer using classes and problems where you do not. All this has nothing
to do with Scheme.

There is one point however that I do not understand. There is no class
system is specified for Scheme (though some implemations may have one). But
Scheme is very precisely specified and so such add-ons look ugly, because an
important part of the language is not specified at all. I think even if the
MIT guys who maintain Scheme think that class systems were not important
they should permit their students to decide for themselves whether they they
want to us classes. Maybe the (the professors) think that Scheme is only the
first step and later the students should move on to a real language anyway.
They (the professors) may think that students should learn algorithms first
and never mind classes which they will need for real work. I do not know and
i do not undertand this.

>   I am currently reading Structure and Interpretation of Classical
>   Mechanics, and it is a _tremendous_ book -- it makes me want to return
to
>   calculus and analysis with Tom Apostol and Richad Courant and write a
>   calculus book with Common Lisp and a graphics library to do 3D plots.

Vow! That really looks interesting!

>   But, again, Scheme is used to teach.  This time, however, Scheme is used
>   productively to teach mechanics, not mastubatorily

LANGUAGE!

>  to reimplement Scheme.

J.B.

(BTW: I saw a photograph of you where you are *laughing*! Hard to believe to
judge from your postings.)

-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Janos Blazi  
View profile  
 More options Dec 22 2001, 4:40 am
Newsgroups: comp.lang.lisp
From: "Janos Blazi" <jbl...@hotmail.com>
Date: Sat, 22 Dec 2001 10:43:36 +0100
Local: Sat, Dec 22 2001 4:43 am
Subject: Re: newbie asks: why CL rather than scheme?
Your CL course is intended for advanced students. But the MIT Scheme course
is for absolute beginners. Don't you think that this may make a difference?

J.B.

-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Dec 22 2001, 5:34 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Sat, 22 Dec 2001 10:33:28 GMT
Local: Sat, Dec 22 2001 5:33 am
Subject: Re: newbie asks: why CL rather than scheme?
* "Janos Blazi" <jbl...@hotmail.com>
| (BTW: I saw a photograph of you where you are *laughing*!  Hard to
| believe to judge from your postings.)

  Do you have a picture of yourself thinking?  That could make me laugh.
  If you really want the irony to be complete, have you next of kin send me
  a picture of your body cut up into a thousands bleeding pieces arranged
  to spell out "cogito ergo sum".  Just thinking about it makes me laugh.

///
--
  The past is not more important than the future, despite what your culture
  has taught you.  Your future observations, conclusions, and beliefs are
  more important to you than those in your past ever will be.  The world is
  changing so fast the balance between the past and the future has shifted.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dr. Edmund Weitz  
View profile  
 More options Dec 22 2001, 6:05 am
Newsgroups: comp.lang.lisp
From: e...@agharta.de (Dr. Edmund Weitz)
Date: Sat, 22 Dec 2001 12:04:47 +0100
Local: Sat, Dec 22 2001 6:04 am
Subject: Re: newbie asks: why CL rather than scheme?

Erik Naggum <e...@naggum.net> writes:
> * "Janos Blazi" <jbl...@hotmail.com>
> | (BTW: I saw a photograph of you where you are *laughing*!  Hard to
> | believe to judge from your postings.)

>   Do you have a picture of yourself thinking?  That could make me laugh.

ROTFL

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Janos Blazi  
View profile  
 More options Dec 22 2001, 6:30 am
Newsgroups: comp.lang.lisp
From: "Janos Blazi" <jbl...@hotmail.com>
Date: Sat, 22 Dec 2001 12:33:32 +0100
Local: Sat, Dec 22 2001 6:33 am
Subject: Re: newbie asks: why CL rather than scheme?

>   Do you have a picture of yourself thinking?  That could make me laugh.
>   If you really want the irony to be complete, have you next of kin send
me
>   a picture of your body cut up into a thousands bleeding pieces arranged
>   to spell out "cogito ergo sum".  Just thinking about it makes me laugh.

As far as i know nobody has had this idea yet. It would be interesting
(maybe for Caleb Carr or Jonathan Kellerman) to write a thriller about a
serial killer who arranges his victims after killing them in the way you are
describing, Massa Erik.

J.B.

-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "newbie asks: why CL rather than scheme? (Dr N. and Mr N)" by IsraelRT
IsraelRT  
View profile  
 More options Dec 22 2001, 8:13 am
Newsgroups: comp.lang.lisp
From: IsraelRT <israe...@optushome.com.au>
Date: Sun, 23 Dec 2001 00:01:45 +1100
Local: Sat, Dec 22 2001 8:01 am
Subject: Re: newbie asks: why CL rather than scheme? (Dr N. and Mr N)
On Fri, 21 Dec 2001 12:41:14 +0100, "Janos Blazi" <jbl...@hotmail.com>
wrote:

> I appreciate Dr Naggum who is a fine CS expert and
>I laugh about and at the same time  feel sorry for Mr Naggum who has lost
>control after drinking some strange potion.

Poor Mr Hyde.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to ""I'm not sure if it's a _bug_ that Scheme has no #Erik, or whether it's a _feature_."" by IsraelRT
IsraelRT  
View profile  
 More options Dec 22 2001, 8:13 am
Newsgroups: comp.lang.lisp, comp.lang.scheme
From: IsraelRT <israe...@optushome.com.au>
Date: Sun, 23 Dec 2001 00:04:26 +1100
Local: Sat, Dec 22 2001 8:04 am
Subject: "I'm not sure if it's a _bug_ that Scheme has no #Erik, or whether it's a _feature_."

On Fri, 21 Dec 2001 16:41:33 GMT, cbbro...@acm.org wrote:
>Just go back to the joke: "I'm not sure if it's a _bug_ that Scheme
>has no #Erik, or whether it's a _feature_."

>Laugh once, because it _is_ funny.  It's worth a chuckle.

#Erik was designed out in the interests of minimalism  and sanity .

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "newbie asks: why CL rather than scheme?" by Kurt B. Kaiser
Kurt B. Kaiser  
View profile  
 More options Dec 22 2001, 4:23 pm
Newsgroups: comp.lang.lisp
From: k...@shore.net (Kurt B. Kaiser)
Date: Sat, 22 Dec 2001 21:21:25 GMT
Local: Sat, Dec 22 2001 4:21 pm
Subject: Re: newbie asks: why CL rather than scheme?

Erik Naggum <e...@naggum.net> writes:
>   Of course you are a Common Lisp non-fan.  Who could have _guessed_?

I think highly of both.  IMO, they have different purposes.

> Real languages are so hard to implement that it makes sense to have someone
> _competent_ do that job for you.

Certainly good advice.

>   You know, that division of labor thing that economists tend to think is so
>   useful for advanced societies.  And what do people implement?  An
>   interpreter that relies on the underlying compiler or interpreter, right?
>   How _useful_ is that?  If they spend a lot of time writing a _simple_
>   compiler and support libraries, etc, with a lot of stuff you simply cannot
>   do in Scheme itself, they will discover how to bootstrap a system using
>   another system.  How _useful_ is that?

Because all that library stuff, while necessary, is irrelevant to understanding
how the core of a language is implemented. It's a lot of detail that doesn't
convey much additional understanding.

Have you actually interned the last chapter of SICP? They start to strip away
the underlying Scheme: the target Scheme interpreter is implemented on a
simulation of a register machine. They then write a simple compiler which
produces instructions for the register machine and integrate it with the
interpreter. There is a decent discussion of GC.

It's clear to the SICP reader how to take the next steps: rewrite the code
generators to produce C or machine language; implement the primitives and
read/display.

Then a budding Lisp language hacker is ready for Queinnec's "Lisp in Small
Pieces."  Eric, language implementation is a hobby for most of us! There are
few _serious_ implementations of _any_ language.

It's not surprising that people get charged up enough to attempt an
implementation: they can see the end of the effort, which is not the case with
a production language like CL.

>   _Why_ does the world need more Scheme implementations than programmers?

Because it takes less than one programmer to do a Scheme implementation? :)

> | This _has_ to be be a win for the Lisp community, because it promotes a
> | Lispy way of thinking about CS.

>   No, what it tells people is that the most important feature of "Lisp" is
>   that professors get to annoy students with a stupid exercise to implement
>   the language in itself.  Scheme is a stupid, stupid thing to teach people
>   who want to _program_.  

SICP is not about learning to _program_. It's an introduction to computer
science. It's an exercise in doing a lot with a little.

>   Is MIT Scheme implemented in Common Lisp?  Why not?

Do many  CLs have their cores implemented in CL?

>   Scheme is a way of thinking that differs from every other language on the
>   planet,

Scheme is a lexically scoped subset of mainstream Lisp as it existed in the
early '70s, pre CL, with some sugar to facilitate internal definitions.  I
suppose you are referring to the inclusion of continuations?

>   _including_ Common Lisp, which in important ways is a mainstream
>   language with non-mainstream operator names.

And CL is the PL/I of the Lisp family. ;)

>   Common Lisp people understand that Scheme is very different, since you
>   can write Scheme in Common Lisp but not vice versa.  

Scheme lacks special variables and declarations; indeed, that seems to make it
difficult to implement a CL in Scheme. I imagine some bright guy could figure a
way.  But who would want to? You would only implement CL if you had serious
intentions, and then you would choose a production language: Implement CL in
CL.

>   I have seen _so_ much Scheme in Common Lisp from people who have been
>   brainwashed in Scheme that it is in fact _the_ strongest reason for me to
>   want Scheme to go to hell.  _Unteaching_ Scheme victims takes longer than
>   teaching a person who has never seen any Lisp at all to become a good
>   Common Lisp programmer.

But is it really _unteaching_? Or is it showing them more?

>   There is an old joke about which platform Oracle ran best on (35 mm slide
>   projector), but I think it might need to be revised:

>   Q: Which platform is best for running Scheme?
>   A: A blackboard.

:)

>   As long as Scheme is marketed as a Lisp, it must be fought by every other
>   Lisp.

Well, if marketed as a production Lisp, I'd  agree with you.

>   Scheme may be closer to the "roots of Lisp", but if you want to
>   write your project reports in the language of Beowulf, or Shakespeare,
>   expect to be unemployed.  Scheme is one of the strongest reasons people
>   who have a fraction of a degree in computer science loathe Lisp and hate
>   parentheses.  For _real_ programmers who want to use large languages so
>   their code can be small instead of re-implementing small languages and
>   their own large libraries, Scheme is a silly toy, and it taints the whole
>   Lisp family with its silliness.

>   _Maybe_ if Scheme was taught differently and would be so kind as to avoid
>   communicating bad things about the entire Lisp family, it would not be so
>   bad.  

It's a lot better than Ye Olde Basic with single character variables and
goto's. That truly damaged people for life.

>   I am currently reading Structure and Interpretation of Classical
>   Mechanics, and it is a _tremendous_ book -- it makes me want to return to
>   calculus and analysis with Tom Apostol and Richad Courant and write a
>   calculus book with Common Lisp and a graphics library to do 3D plots.
>   But, again, Scheme is used to teach.  This time, however, Scheme is used
>   productively to teach mechanics, not mastubatorily to reimplement Scheme.

I haven't convinced myself to cough up the 60 bucks yet, but I'm sure I will
eventually.  It looks great. But I already have a copy of Jose and Saletan,
"Classical Dynamics", which covers the same area in the same modern way, though
without the neat interactive software.

It's interesting that using Scheme doesn't detract from the exposition of SICM
any more than it does from providing an introduction to computer science (or
whatever you want to call the field ;) in SICP.

But it seems that the temptation to teach _all_ of CL once you start is
difficult to overcome.  The students end up not seeing the forest for the
trees.

SICP written in a subset of CL would look much the same, assuming you
sugared it up to provide for internal definitions.

*******************

A paper on the "Supercomputer Toolkit" as devised by Ableson et. al. and used,
among other things, to confirm the chaotic nature of the solar system by
simulating the next 100 million years:

http://citeseer.nj.nec.com/berlin94partial.html

The original code was written in Scheme, and it's an example of something
sizeable and sophisticated written in Scheme. They got a speedup of 38x by
optimizing and rewriting the lower levels in C, and another 37x going to
special parallel hardware. This effort was necessary to complete the
calculation in a reasonable time on late '80s hardware.

There was a popular book written about the Sussman/Wisdom "Digital Orrery." My
copy is packed away somewhere, and I apologize for not being able to give you
the reference.

Regards, KBK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt B. Kaiser  
View profile  
 More options Dec 22 2001, 7:08 pm
Newsgroups: comp.lang.lisp
From: k...@shore.net (Kurt B. Kaiser)
Date: Sun, 23 Dec 2001 00:06:49 GMT
Local: Sat, Dec 22 2001 7:06 pm
Subject: Re: newbie asks: why CL rather than scheme?

Robert Strandh <stra...@labri.u-bordeaux.fr> writes:
> I am afraid this is contrary to my experience.

Thanks for the interesting and extended response.

> My experience with teaching programming Scheme was that students
> perceived it as not being credible.  They didn't buy the argument that
> it is possible to have a fast implementation while at the same time I
> couldn't point to one.  They also weren't convinced that Scheme is a
> good language since it is small, but then each implementation adds
> mutually incompatible extensions for things like object orientation.
> And they couldn't understand why such a supposedly great language
> couldn't be found in any commercial product whatsoever.

> Perhaps your students are better than mine, but the ability to write a
> simple implementation of Scheme in Scheme did not impress them,
> probably because they had nothing to compare with.  In addition, for
> an implementation to be useful, as opposed to be a pedagogical toy, it
> would have to do quite a lot more, including optimizations that can be
> quite messy.

Optimizations (and error checking!) are a big project and generally can't be
addressed in a "programming" course. Even a compiler course has problems
getting to them. But isn't it useful for all CS students to understand at an
early point, at least in principle, how the basic toos (interpreters,
assemblers, compilers) are constructed?

> At the end of the course, they were left with the impression that
> Scheme is a language that is:

>   - unreadable because it has lots of parentheses that serve no
>     credible purpose,

>   - slow, because it is always implemented in the form of an
>     interpreter,

>   - useless, since used only to implement itself, and has to be
>     extended to do anything useful, and

>   - not used for any real purpose, so irrelevant to their future as
>     developers.

The first two points are bogus and often applied to CL as well as Scheme.

The last two are really the same point. We agree that Scheme is not a
production language.  It was designed (pre CL) as a teaching and research
language. The reference I made in my previous post shows Scheme is more than a
toy.  However, it's a pretty strong point in favor of CL.

I suppose the students would really rather be learning something useful like
C++ or Visual Basic so they can quickly code up some GUIs :((

> > Then when those kids gain the confidence to do something big, CL is
> > waiting!  Enough of the internecine warfare! Just tell them, "OK, people,
> > now you're ready to come over to the big time, welcome!"

> I don't buy this argument.  There is no intrinsic value in using a
> different language for doing small things if the ultimate purpose is
> to teach them how to do big things.  There would be a reason to do
> that if Common Lisp somehow made things harder to explain, and if
> there were no other inconveniences with Scheme.  But I do not think
> that is the case.

If you were to teach an introductory CS course like SICP, would you consider
defining a subset of CL for expository purposes and deferring the bulk of CL to
a "programming" course? To avoid distraction by the arcana of CL?

> For those who read French, please consult my web page for the course
> at:

> http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/MTP/2001-2002/...

Thanks for sharing these pages.  I see you have written a book on CL and that
it is available online.  I'm afraid my French is pretty limited, but I see
that you have provided a comparison of CL and Scheme in the Appendix. The
overview is similar to my position.  Your comments on the semantic
difference between superficially similar CL/Scheme expressions are thought
provoking.

I didn't follow your comment in that Appendix on Local Definitions.  If (with
my poor French) I understand it correctly, you say that the CL

(let ((x 0))
  (defun F()
     ...))

is not possible in Scheme, but

(let ((x 0))
  (define (foo)
    x)
  (foo))

seems to work ok. Could you straighten me out?

Regards, KBK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Strandh  
View profile  
 More options Dec 23 2001, 1:40 am
Newsgroups: comp.lang.lisp
From: Robert Strandh <stra...@labri.u-bordeaux.fr>
Date: 23 Dec 2001 07:38:47 +0100
Local: Sun, Dec 23 2001 1:38 am
Subject: Re: newbie asks: why CL rather than scheme?

"Janos Blazi" <jbl...@hotmail.com> writes:
> Your CL course is intended for advanced students. But the MIT Scheme course
> is for absolute beginners. Don't you think that this may make a difference?

Perhaps.  On the other hand, I think beginners today have a very clear
(but wrong) idea of what programming and programming languages ought
to be like.  This makes them reject a priori anything that doesn't
look like the expectations.  

The programming course in the engineering school that I referred to is
for beginners, although they are not directly out of high school (I am
not going to try to explain the French higher education system to
you), and the effect is the same as for more advanced students.  I
secretly plan to take over that course and replace Scheme by Common
Lisp.  I'll let you know what happened in a year or two.
--
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Strandh  
View profile  
 More options Dec 23 2001, 2:10 am
Newsgroups: comp.lang.lisp
From: Robert Strandh <stra...@labri.u-bordeaux.fr>
Date: 23 Dec 2001 08:10:29 +0100
Local: Sun, Dec 23 2001 2:10 am
Subject: Re: newbie asks: why CL rather than scheme?
k...@shore.net (Kurt B. Kaiser) writes:

> > Perhaps your students are better than mine, but the ability to write a
> > simple implementation of Scheme in Scheme did not impress them,
> > probably because they had nothing to compare with.  In addition, for
> > an implementation to be useful, as opposed to be a pedagogical toy, it
> > would have to do quite a lot more, including optimizations that can be
> > quite messy.

> Optimizations (and error checking!) are a big project and generally can't be
> addressed in a "programming" course. Even a compiler course has problems
> getting to them. But isn't it useful for all CS students to understand at an
> early point, at least in principle, how the basic toos (interpreters,
> assemblers, compilers) are constructed?

Yes it is useful.  But part of that exercise is to show how clear the
code for the interpreter is when Scheme is used as opposed to a
different language.  This is the part they don't get, since they
haven't seen any interpreter in any other language, nor a compiler.
Such an exercise is probably better in the compiler course.

Less so, because I point out during the first lecture that there is no
such thing as a "compiled language" and that the CL implementation we
use is based on a compiler.  This takes care of the second point.

The first point is taken care of by the part of the course about
macros.  I repeat the necessity for the programmer to think in terms
of the internal representation and not in terms of surface syntax.
The only way this can be done in practice is to have a simple
one-to-one correspondence between surface syntax and internal
representation.

> I suppose the students would really rather be learning something useful like
> C++ or Visual Basic so they can quickly code up some GUIs :((

Actually, this is less of a problem than you might think.  I have
discovered that students at the engineering school are very
ad-driven.  They want to learn what is wanted by industry.  From that
desire comes demands on C++ etc.  However, I also follow half a dozen
or so students per year during their 5th-year 6-month internship.  For
the past 10 years, I systematically ask their boss what he or she
thinks about our teaching program.  The answer is always (with one
exception in 10 years): "I don't know.  I haven't looked at it.  We
trust you to do the right thing.  Your students are good, so we are
happy".  

Explaining this to the students takes away some of the resistance to
learning methods and languages that are not used in industry.  

However, the university students don't have this problem (being
ad-driven), or at least to a much smaller degree.  This is a good
thing.

> If you were to teach an introductory CS course like SICP, would you consider
> defining a subset of CL for expository purposes and deferring the bulk of CL to
> a "programming" course? To avoid distraction by the arcana of CL?

While I think SICP was an eye-opener for me (I read it during my PhD
studies), I don't think it would be a good basis for a programming
course here in Bordeaux.  MIT is probably quite different, I would
imagine.

I do plan to teach an introductory programming course using CL, but it
won't look like SICP.  In particular, I am not planning to emulate
classes using closures.  I would probably avoid some more advanced
features initially (CLOS, perhaps macros, packages, ...), and instead
concentrate on something like first-class functions and the
programming style that they facilitate.

> Thanks for sharing these pages.  I see you have written a book on CL and that
> it is available online.  

Correct.  One obstacle we have here is that students are reluctant to
buying the course literature, especially if it is hard to find (such
as Graham's ANSI CL).  In addition, they are still somewhat more
comfortable with French than with English.  The exam results improved
considerably last year when I printed (legally) David Touretzky's book
and sold it to them.  This year I use my own book for the first time.
We'll know end  of January whether that improved things as well.  

> I'm afraid my French is pretty limited, but I see
> that you have provided a comparison of CL and Scheme in the Appendix. The
> overview is similar to my position.  Your comments on the semantic
> difference between superficially similar CL/Scheme expressions are thought
> provoking.

Hmmm.  I thought they were pretty much standard.

> I didn't follow your comment in that Appendix on Local Definitions.  If (with
> my poor French) I understand it correctly, you say that the CL

> (let ((x 0))
>   (defun F()
>      ...))

> is not possible in Scheme, but

> (let ((x 0))
>   (define (foo)
>     x)
>   (foo))

> seems to work ok. Could you straighten me out?

The construction:

  (let ((x 0))
    (defun f ()
      ...))

in CL defines a global function with x in its environment.  The way to
do that in Scheme (I claim) is:

  (define foo)
  (let ((x 0))
    (set! foo (lambda () ...)))

I guess you could do something similar to your idea, such as

  (define f
    (let ((x 0))
      (define (foo)
        ...)
      foo))

--
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Dec 23 2001, 2:44 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Sun, 23 Dec 2001 07:44:24 GMT
Local: Sun, Dec 23 2001 2:44 am
Subject: Re: newbie asks: why CL rather than scheme?
* Robert Strandh <stra...@labri.u-bordeaux.fr>
| On the other hand, I think beginners today have a very clear (but wrong)
| idea of what programming and programming languages ought to be like.
| This makes them reject a priori anything that doesn't look like the
| expectations.

  But a university should reject anyone who is unable to deal with facts
  that run counter to their expectations, indeed all of their old beliefs.
  If there is anything that is worth learning at a university, it is that
  bringing expectations to one's research and rejecting information that
  does not fit them is Wrong.  In fact, few things you do can be worse if
  you really want to _learn_ something.  The first place new knowledge that
  might topple old beliefs can be expected to be found is at universities,
  so if somebody enters a university expecting to have their existing
  knowledge confirmed, as opposed to turned inside out and completely
  revised, they have wrong expectations about what a university is for.

| I secretly plan to take over that course and replace Scheme by Common
| Lisp.  I'll let you know what happened in a year or two.

  I look forward to it.  I find your "reports from the field" informative,
  maybe particularly since they tend to confirm my belief that Scheme hurts
  students.  :)

///
--
  The past is not more important than the future, despite what your culture
  has taught you.  Your future observations, conclusions, and beliefs are
  more important to you than those in your past ever will be.  The world is
  changing so fast the balance between the past and the future has shifted.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Strandh  
View profile  
 More options Dec 23 2001, 6:20 am
Newsgroups: comp.lang.lisp
From: Robert Strandh <stra...@labri.u-bordeaux.fr>
Date: 23 Dec 2001 12:28:25 +0100
Local: Sun, Dec 23 2001 6:28 am
Subject: Re: newbie asks: why CL rather than scheme?

Erik Naggum <e...@naggum.net> writes:
>   But a university should reject anyone who is unable to deal with facts
>   that run counter to their expectations, indeed all of their old beliefs.

I have reasons to believe that such behavior can be altered, at least
to some extent.  Thus, rather than rejecting theses students, we
should accept them and try to change their behavior.  If that fails,
however, they should be rejected.  But that happens naturally, since
failure to accept our teaching usually leads to failure to get a
degree.  

Things are complicated here in France by the fact that we are not
allowed to reject certain students.  

>   If there is anything that is worth learning at a university, it is that
>   bringing expectations to one's research and rejecting information that
>   does not fit them is Wrong.  In fact, few things you do can be worse if
>   you really want to _learn_ something.  

Right on.  But for students to know that such a thing is worth
learning, it has to be taught to them.  I spend considerable time on
meta-teaching, i.e., on talking about the learning process and how
certain psychological phenomena can make them reject certain
pedagogical messages.  See for instance:

http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/MTP/Common/Str...

>   I look forward to it.  I find your "reports from the field" informative,

Thank you.  I'll keep them coming.  

--
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Dec 23 2001, 9:54 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Sun, 23 Dec 2001 14:54:24 GMT
Local: Sun, Dec 23 2001 9:54 am
Subject: Re: newbie asks: why CL rather than scheme?
* Erik Naggum

> But a university should reject anyone who is unable to deal with facts
> that run counter to their expectations, indeed all of their old beliefs.

* Robert Strandh
| I have reasons to believe that such behavior can be altered, at least to
| some extent.  Thus, rather than rejecting theses students, we should
| accept them and try to change their behavior.  If that fails, however,
| they should be rejected.

  I have to concede that such patience has significant merits, but that
  does not mean I possess it.  :)

| http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/MTP/Common/Str...

  Interesting.  I have recently been reading about cognitive dissonance¹,
  the theories about which I think explain how people deal with information
  that runs counter to previously held beliefs and how some people believe
  only the first thing they hear about something and thereafter reject any
  and all information that would contradict it because of the sense of
  conflict created by the contradiction.  To me, this explained why people
  believe that Lisp is interpreted and slow -- it was the first thing they
  heard about it.  This is also why I thought this community would find it
  at least somewhat interesting to have many people's first contact with
  "Lisp" through an encyclopedia be somewhat less concerned with spreading
  the old myths.

  It seems from this cursory exposition about performance-orientedness that
  those who "suffer" from it are very concerned with not being exposed to
  counter-information to _their_ first-learned techniques, whereas the
  perfection-oriented seek out counter-information that could improve what
  they know about the world.  It seems to me therefore that the coping
  strategy for cognitive dissonance is related to performance- or
  perfection-orientedness.

  I have long wondered if different programming languages appeal strongly
  to different personality types.  It appears to me that, e.g., Perl is the
  ultimate language for the performance-oriented and Common Lisp is much
  more suited to the perfection-oriented than, e.g., Scheme is, where
  "performance" is achieved in terms of how small the language can be made,
  how fast it can be learned, etc, so any intellectual curiosity that could
  make the language "bigger" (even if there would be a smaller language on
  the other side of some more research) would be rejected a priori.  For
  someone who wishes to "get started", Scheme appears to have a stronger
  appeal than Common Lisp, whereas those who are personally interested in
  becoming better programmers, as opposed to create the "perfect" language
  according to some one-axis metric, would choose Common Lisp.  This would
  explain another aspect of the difference between the communities and why
  I think bringing performance-oriented solutions into Common Lisp has been
  a serious detractor from getting _my_ job done.

  If I understand this correctly, 90%-solutions are no good if you are
  perfection-oriented, but are great if you are performance-oriented,

///
-------
¹ http://cognet.mit.edu/MITECS/Entry/lepper.html
  You have to be a subscriber to get the full text of the article, which is
  included with the actual book.
--
  The past is not more important than the future, despite what your culture
  has taught you.  Your future observations, conclusions, and beliefs are
  more important to you than those in your past ever will be.  The world is
  changing so fast the balance between the past and the future has shifted.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed L Cashin  
View profile  
 More options Dec 23 2001, 2:16 pm
Newsgroups: comp.lang.lisp
From: Ed L Cashin <ecas...@terry.uga.edu>
Date: 23 Dec 2001 14:14:20 -0500
Local: Sun, Dec 23 2001 2:14 pm
Subject: Re: newbie asks: why CL rather than scheme?

Robert Strandh <stra...@labri.u-bordeaux.fr> writes:

...

> Right on.  But for students to know that such a thing is worth
> learning, it has to be taught to them.  I spend considerable time on
> meta-teaching, i.e., on talking about the learning process and how
> certain psychological phenomena can make them reject certain
> pedagogical messages.  See for instance:

> http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/MTP/Common/Str...

That is a very interesting paper.  Thanks much for the link!

Have you been trying to encourage students to become
"perfection-oriented" long enough to tell us how many
production-oriented students actually respond?  That is, how many
recognize the need for change and then become enthusiastic about
learning and persistently curious about finding "the better way"?

--
--Ed Cashin                     integrit file-verification system:
  ecas...@terry.uga.edu         http://integrit.sourceforge.net/

    Note: If you want me to send you email, don't munge your address.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paolo Amoroso  
View profile  
 More options Dec 23 2001, 4:33 pm
Newsgroups: comp.lang.lisp
From: Paolo Amoroso <amor...@mclink.it>
Date: Sun, 23 Dec 2001 22:14:00 +0100
Subject: Re: newbie asks: why CL rather than scheme?
On 22 Dec 2001 09:39:51 +0100, Robert Strandh <stra...@labri.u-bordeaux.fr>
wrote:

> doubts.  I therefore started teaching a programming course based
> entirely on Common Lisp.

> Now that I use Common Lisp, things seem to work much better (at least
> that is what I tell myself; perhaps some of my students reading this
> can confirm or deny this).  

I'm not a student of yours. But given the contributions that you and your
students are giving to McCLIM and other Common Lisp projects, I think that
things do work well.

Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://web.mclink.it/amoroso/ency/README
[http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Strandh  
View profile  
 More options Dec 23 2001, 11:50 pm
Newsgroups: comp.lang.lisp
From: Robert Strandh <stra...@labri.u-bordeaux.fr>
Date: 24 Dec 2001 05:56:05 +0100
Local: Sun, Dec 23 2001 11:56 pm
Subject: Re: newbie asks: why CL rather than scheme?
Ed L Cashin <ecas...@terry.uga.edu> writes:

> Have you been trying to encourage students to become
> "perfection-oriented" long enough to tell us how many
> production-oriented students actually respond?  That is, how many
> recognize the need for change and then become enthusiastic about
> learning and persistently curious about finding "the better way"?

I have done it for a while, but I am afraid I don't have any data to
confirm that it is working.  I don't think I have enough knowledge
about the scientific methods necessary to conduct such experiments,
but it would be an interesting thing to suggest as a collaboration
with a department of psychology.

--
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oliver Bandel  
View profile  
 More options Dec 24 2001, 6:45 am
Newsgroups: comp.lang.lisp
From: Oliver Bandel <oli...@first.in-berlin.de>
Date: 23 Dec 2001 23:48:44 +0100
Local: Sun, Dec 23 2001 5:48 pm
Subject: Re: newbie asks: why CL rather than scheme?

Janos Blazi <jbl...@hotmail.com> wrote:

[...]

> There is a third, personal point: As I am not an expert I must trust
> somebody.

As a sociologist a la Niklas Luhman, people would say: Trust is
reducing of complexity.

(Thinking about cognitive diossonance (as mentioned in this
thread somewhere), it maybe is "trust yourself and your experience
of your life" and as such is again reduction of complexity...).

...only some thoughts from me... I think the thread here is too
big for going deeper into it.

I better use the time for learning scheme... :-)
(Lisp is planned for next year. :-))

Ciao,
   Oliver


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed L Cashin  
View profile  
 More options Dec 24 2001, 10:15 am
Newsgroups: comp.lang.lisp
From: Ed L Cashin <ecas...@terry.uga.edu>
Date: 24 Dec 2001 10:14:03 -0500
Local: Mon, Dec 24 2001 10:14 am
Subject: Re: newbie asks: why CL rather than scheme?

Robert Strandh <stra...@labri.u-bordeaux.fr> writes:
> Ed L Cashin <ecas...@terry.uga.edu> writes:

> > Have you been trying to encourage students to become
> > "perfection-oriented" long enough to tell us how many
> > production-oriented students actually respond?  That is, how many
> > recognize the need for change and then become enthusiastic about
> > learning and persistently curious about finding "the better way"?

> I have done it for a while, but I am afraid I don't have any data to
> confirm that it is working.  I don't think I have enough knowledge
> about the scientific methods necessary to conduct such experiments,
> but it would be an interesting thing to suggest as a collaboration
> with a department of psychology.

I was only hoping for a subjective observation based on interaction
with the students -- but I guess you've answered my question
indirectly, since you supposedly wouldn't have kept doing it if it had
no effect.

--
--Ed Cashin                     integrit file-verification system:
  ecas...@terry.uga.edu         http://integrit.sourceforge.net/

    Note: If you want me to send you email, don't munge your address.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas F. Burdick  
View profile  
 More options Dec 25 2001, 2:45 pm
Newsgroups: comp.lang.lisp
From: t...@conquest.OCF.Berkeley.EDU (Thomas F. Burdick)
Date: 25 Dec 2001 11:45:46 -0800
Local: Tues, Dec 25 2001 2:45 pm
Subject: Re: newbie asks: why CL rather than scheme?

Erik Naggum <e...@naggum.net> writes:
> * Erik Naggum
> > But a university should reject anyone who is unable to deal with facts
> > that run counter to their expectations, indeed all of their old beliefs.

> * Robert Strandh
> | I have reasons to believe that such behavior can be altered, at least to
> | some extent.  Thus, rather than rejecting theses students, we should
> | accept them and try to change their behavior.  If that fails, however,
> | they should be rejected.

>   I have to concede that such patience has significant merits, but that
>   does not mean I possess it.  :)

And that's probably a good argument for Robert being a professor, and
you working with people who have *already* been through a university :-).
I actually think that the freshmen at the best universities are
probably the most prone to thinking that what they learn is going to
confirm what they already know, because they were usually in the very
very top of their classes before, and so learned from that experience.
It's the wrong lesson to learn, but it won't unlearn itself
automatically; it takes a good professor or two.

--
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                              
   |     ) |                              
  (`-.  '--.)                              
   `. )----'                              


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Warnock  
View profile  
 More options Dec 26 2001, 3:53 pm
Newsgroups: comp.lang.lisp
Followup-To: comp.lang.lisp
From: r...@rigden.engr.sgi.com (Rob Warnock)
Date: 26 Dec 2001 20:53:25 GMT
Local: Wed, Dec 26 2001 3:53 pm
Subject: Re: newbie asks: why CL rather than scheme?
Robert Strandh  <stra...@labri.u-bordeaux.fr> wrote:
+---------------
| The construction:
|
|   (let ((x 0))
|     (defun f ()
|       ...))
|
| in CL defines a global function with x in its environment.  The way to
| do that in Scheme (I claim) is:
|
|   (define foo)
|   (let ((x 0))
|     (set! foo (lambda () ...)))
+---------------

Actually, the standard idiom for this in Scheme is simply:

    (define foo
      (let ((x 0))
        (lambda () ...)))

You only need "set!"s if you're going to create multiple closures
over shared variables:

    (define foo #f)
    (define bar #f)
    (define baz #f)
    (let ((x 0))
      (set! foo (lambda () ...))
      (set! bar (lambda () ...))
      (set! baz (lambda () ...)))

But that's admittedly ugly, which is why some Schemes provide a
multiple-value top-level define, e.g., MzScheme:

    (define-values (foo bar baz)
      (let ((x 0))
        (values
          (lambda () ...)
          (lambda () ...)
          (lambda () ...))))

In Common Lisp, of course, the original example extends trivially:

    (let ((x 0))
      (defun foo () ...)
      (defun bar () ...)
      (defun baz () ...))

-Rob

-----
Rob Warnock, 30-3-510           <r...@sgi.com>
SGI Network Engineering         <http://www.meer.net/~rpw3/>
1600 Amphitheatre Pkwy.         Phone: 650-933-1673
Mountain View, CA  94043        PP-ASEL-IA

[Note: aaanal...@sgi.com and zedwa...@sgi.com aren't for humans ]  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phil Fraering  
View profile  
 More options Dec 26 2001, 8:04 pm
Newsgroups: comp.lang.lisp
From: Phil Fraering <p...@globalreach.net>
Date: Tue, 25 Dec 2001 21:19:49 -0600
Local: Tues, Dec 25 2001 10:19 pm
Subject: Re: newbie asks: why CL rather than scheme?

Robert Strandh <stra...@labri.u-bordeaux.fr> writes:
>At the end of the course, they were left with the impression that
>Scheme is a language that is:
>  - unreadable because it has lots of parentheses that serve no
>    credible purpose,
>  - slow, because it is always implemented in the form of an
>    interpreter,

Get thee to Christopher Browne's home page; there are lots
and lots of scheme compilers listed there.

Phil
--
Phil Fraering
p...@globalreach.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian P Templeton  
View profile  
 More options Dec 26 2001, 10:30 pm
Newsgroups: comp.lang.lisp
From: Brian P Templeton <b...@tunes.org>
Date: Thu, 27 Dec 2001 03:30:42 GMT
Local: Wed, Dec 26 2001 10:30 pm
Subject: Re: newbie asks: why CL rather than scheme?
k...@shore.net (Kurt B. Kaiser) writes:

> Erik Naggum <e...@naggum.net> writes:

>>   Of course you are a Common Lisp non-fan.  Who could have _guessed_?

> I think highly of both.  IMO, they have different purposes.

Right, one is for writing useful programs and the other is for
implementing itself. (This has multiple interpretations; pick the one
that offends you the least :)).

>> Real languages are so hard to implement that it makes sense to have someone
>> _competent_ do that job for you.

> Certainly good advice.

And to misinterpret Erik's statement, that would leave the
incompentent developers to implement trivial languages such as Scheme.
;)

>>   You know, that division of labor thing that economists tend to think is so
>>   useful for advanced societies.  And what do people implement?  An
>>   interpreter that relies on the underlying compiler or interpreter, right?
>>   How _useful_ is that?  If they spend a lot of time writing a _simple_
>>   compiler and support libraries, etc, with a lot of stuff you simply cannot
>>   do in Scheme itself, they will discover how to bootstrap a system using
>>   another system.  How _useful_ is that?

> Because all that library stuff, while necessary, is irrelevant to understanding
> how the core of a language is implemented. It's a lot of detail that doesn't
> convey much additional understanding.

Do all the extra functions you have to write yourself in Scheme convey
additional understanding when compared to short, concise Common Lisp
programs?

Why not implement a trivial language in CL? If the point is to show
how to write meta-circular interpreters, then follow that exercise by
re-implementing the trivial language in itself. This is how I'm
learning about interpreter-writing (and maybe later compiler-writing).

>>   _Why_ does the world need more Scheme implementations than programmers?

> Because it takes less than one programmer to do a Scheme implementation? :)

Because every programmer needs to have at least two or three Scheme
implementations to provide all the nonstandard extensions he needs. :)

>> | This _has_ to be be a win for the Lisp community, because it promotes a
>> | Lispy way of thinking about CS.

>>   No, what it tells people is that the most important feature of "Lisp" is
>>   that professors get to annoy students with a stupid exercise to implement
>>   the language in itself.  Scheme is a stupid, stupid thing to teach people
>>   who want to _program_.  

> SICP is not about learning to _program_. It's an introduction to computer

  ^^^^
to understand my response better, misread this as Scheme
> science. It's an exercise in doing a lot with a little.

Similar to how going out in a desert and travelling to a more
habitatable area several hundred miles away with two days' worth of
food could be considered an exercise in doing a lot with a little,
rather than an exercise in how someone might normally live.

>>   Is MIT Scheme implemented in Common Lisp?  Why not?

> Do many  CLs have their cores implemented in CL?

*Yes*! CMUCL and SBCL are two good examples. CLISP is (IIRC)
implemented in C, and I'm not sure what LW and Allegro CL are
implemented in.

>>   Scheme is a way of thinking that differs from every other language on the
>>   planet,

> Scheme is a lexically scoped subset of mainstream Lisp as it existed in the
> early '70s, pre CL, with some sugar to facilitate internal definitions.  I
> suppose you are referring to the inclusion of continuations?

>>   _including_ Common Lisp, which in important ways is a mainstream
>>   language with non-mainstream operator names.

> And CL is the PL/I of the Lisp family. ;)

No, I'd rather joke that CL is the ADA of the Lisp family, which would
then lead me to jest that Scheme is the M$ Visual Basick of the Lisp
family (meaning that it is a sickening, twisted, restrictive, fascist
dialect of an already awful group of languages[¹] that also incorporates
the worst aspects of another language).

;)

It is unteaching. They must be taught that there are other control
mechanisms than recursion, for example.

>>   There is an old joke about which platform Oracle ran best on (35 mm slide
>>   projector), but I think it might need to be revised:

>>   Q: Which platform is best for running Scheme?
>>   A: A blackboard.

> :)

Blackboards are much faster at running Scheme than other platforms,
but the current GCs available for them don't work too well. :)

>>   As long as Scheme is marketed as a Lisp, it must be fought by every other
>>   Lisp.

> Well, if marketed as a production Lisp, I'd  agree with you.

`Production'? You mean ``the act or process of producing something''?
So Scheme should not be marketed as being a Lisp usable for producing
something? Here we agree (although I suspect your intended meaning was
quite different).

Yes, it (Ye Olde Basick) does. But so does teaching people Lisp in a
way that drives them back to the languages that damage them for life.
[Analogy between Scheme and the US Government elided - to much of a
size difference to make sense :).]

Footnotes:
[¹] In Scheme's case, referring to imperative languages such as ALGOL,
Pascal, C, &c, *not* Lisp
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 101 - 125 of 139 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »