Newsgroups: comp.lang.lisp,comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!ames!enews.sgi.com!ix.netcom.com!vfr750
From: vfr750@netcom.com (Will Hartung)
Subject: Re: Which one, Lisp or Scheme?
Message-ID: <vfr750E4BLBo.7oG@netcom.com>
Keywords: LISP Scheme
Organization: Netcom On-Line Services
X-Newsreader: NN version 6.5.0 CURRENT #9
References: <slrn5e5geh.dl.yunho@csl.snu.ac.kr>
Date: Mon, 20 Jan 1997 18:43:00 GMT
Lines: 90
Sender: vfr750@netcom15.netcom.com
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:24682 comp.lang.scheme:17960

yunho@csl.snu.ac.kr (Yunho Jeon) writes:

>Hello,
>I have some idea to experiment with, and the idea needs a language which can
>execute codes produced by the program itself. Naturally, I thought LISP would 
>be the best choice. But while reading LISP FAQ, I found that there are 
>some varients of the language. Notably, Scheme seemed to be more modern and
>cleaner language than LISP.  Because I have almost no experience in those
>languages, I would like to get answers from LISP/Scheme experts
>for the following questions.

I'm no expert, but that hasn't stopped me before.

>1) Which language is easier to learn (for C/C++ programmer)?  
>   Scheme seems to be easier because it is much smaller than common lisp,
>   but how big is the difference (in terms of learning curve)?

Frankly, I would say that Lisp would be easier to learn than Scheme
for an C/C++ programmer.

Scheme is a lovely, elegant language, and is, I believe simpler and
easier to learn in its own right. It is hard not to like Scheme. But,
for someone who has a lot of history with C/C++, the way Scheme is
presented could throw you for a loop. You, as the student, would
probably take the approach of trying to learn "Scheme Syntax", whereas
the books spend more time on the "Scheme Way". 

The "Scheme Way" of programming is very functional, lots of recursion,
local helper functions, etc. It is really a pretty nice way to go
about task of coding. However, its not the way MOST people
(particularly C/C++ people) write code. The idioms are all wrong.

If you look at how Lisp is presented, especially in something like
Paul Grahams "ANSI Common Lisp" book, it is easier to see the how your
entrenched C/C++ idioms translate into Lisp syntax and structures.

Once you get past the hurdles of the fact that you don't need pointers,
its pretty easy to write C/C++ code in a Lisp syntax. And Common Lisp
has an enormous catalog of functions to do all sorts of things. All of
the structures you are used to are in the language. 

If you want to change the way to think about progamming and problem
solving, then grab all of the Scheme books, dig in, strap yourself
down, and hang on for a wild ride. It's quite a trip.

If you just want to work on your task, using your current mindset,
then get into Common Lisp, and let your fingers do the talking. You can
treat CL like C/C++ a lot easier. However, I do suggest you go in with
an open mind for the new, more powerful ways of solving problems that CL
can provide for you.

>2) The command to parse and execute a source program is 'eval', right?
>   If it is, is it a standard feature of Scheme? The Scheme FAQ was not
>   very clear on this point. Surely some implementations have it, but
>   the language seems to be more suited for compilers. Does the run-time
>   has embedded compiler? What's the overhead of it (size/speed)? 
>   If I can't use compiler for my purposes, what do I lose and how much 
>   (again in terms of speed)?

'eval' is standard in CL, not standard in Scheme, but as has been
mentioned, many Schemes provide it. 'eval' can incur a pretty dramatic
hit on the execution size of a program. How much overhead depends on
the implementation.

>3) What about foreign language (C/C++) language interface and GUI's?
>   It's not essential for now, but it may be needed in future.

Many systems provide foriegn function interfaces. GUI's are available,
though less prominent.

>4) I am going to use Linux as the experiment platform, and don't want to
>   buy any commercial software - I'm only a student and it's hard to buy
>   and get support of such a software in Korea, where I live.
>   Both language has a lot of free implementations, but are they mature
>   enough?

There are several systems available for Linux. The FAQ lists most of
them. I like Aubrey Jaffers SCM Scheme package, and the latest Gambit-C
2.2 Scheme compiler getting a lot of good press. Scheme packages
differ wildly, so check the details.

There is a lot of "real" work going on in many of these packages, and
most are very mature.

Good Luck!

-- 
Will Hartung - Rancho Santa Margarita. It's a dry heat. vfr750@netcom.com
1990 VFR750 - VFR=Very Red    "Ho, HaHa, Dodge, Parry, Spin, HA! THRUST!"
1993 Explorer - Cage? Hell, it's a prison.                    -D. Duck
