[plt-scheme] Question on Teaching Scheme with DrScheme

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Nov 5 15:04:06 EST 2002

On Nov  5, Jerzy Karczmarczuk wrote:
> [...]
> If what you really would use are mainly imperative constructs, FORWARD,
> TURN, etc., why use Scheme at all?

I think that you have it backwards (probably due to influence from a
certain other language you advocate here...) -- if you use a really
pure language, then there is no point in a program that is mostly
imperative.  This is (IMO, of course) where it breaks -- you go though
all those efforts to model side effects etc in a pure language, so the
result is a program that looks like this

  getLine :: IO String
  getLine =  do c <- getChar
                if c == '\n'
                     then return ""
                     else do l <- getLine
                             return (c:l)

so what was the point to begin with?

OTOH, Scheme does have side effects available, with the usual load of
other advantages that probably do not need any advocation here -- some
of them apply equally to the whole langauge including its
side-effects.  So why *not* use it?


> Please don't think that I don't like Scheme. I use it for years to teach
> computer graphics, but I exploit functional algorithms, and I deal with
> 20-years old babies...
> 
> In Scheme you can do everything. Nevertheless I still believe that one
> should not *force* things. The "imperative constructionism" seems cleaner
> in Python.

???

I have recently gave up to the pressure and had a look at Python.  It
has a lot of cute things but I don't think it's anywhere close to a
good language like Haskell, which itself is anywhere close to Scheme.
So if I do have imperative behavior in Scheme (without using any
force, really), why should I go there?


> And in Smalltalk (for example: Squeak).

Or there?


> In both, and in Smalltalk in particular it is easier to code complex
> interactions, like in Alice.
> 
> I change my mind when somebody takes the OpenGL layer in DrScheme,
> and implements Alice over it. Seriously. This will be a breakthrough
> in approaching Scheme to children, and I would like to participate
> in such a project.

What is Alice?  All I could get from google is some better-Aliza clone
that talks to itself.

I just think that all the work in Scheme, and in PLT Scheme in
particular -- like the modules and the syntax work, is relevant to all
code no matter how imperative it is.  But maybe that Alice thing is
the magic idea that will convince me otherwise and make me commit to
C++ for ever?

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.