Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!gatech!psuvax1!news.ecn.bgu.edu!siemens!princeton!news.princeton.edu!blume
From: blume@dynamic.cs.princeton.edu (Matthias Blume)
Subject: Re: redefinition of builtin procedures
In-Reply-To: 2wienbe@rzdspc19.informatik.uni-hamburg.de's message of 28 Nov 1994 12:45:00 GMT
Message-ID: <BLUME.94Nov28101600@dynamic.cs.princeton.edu>
Originator: news@hedgehog.Princeton.EDU
Sender: news@Princeton.EDU (USENET News System)
Nntp-Posting-Host: dynamic.cs.princeton.edu
Organization: Princeton University
References: <QOBI.94Nov21204828@qobi.ai> <BLUME.94Nov22102949@dynamic.cs.princeton.edu>
	<2WIENBE.94Nov28134500@rzdspc19.informatik.uni-hamburg.de>
Date: Mon, 28 Nov 1994 15:16:00 GMT
Lines: 88

In article <2WIENBE.94Nov28134500@rzdspc19.informatik.uni-hamburg.de> 2wienbe@rzdspc19.informatik.uni-hamburg.de (Axel Wienberg) writes:

   First, I would like to see Scheme running on something slower than
   "today's fast machines", too (for example on my Linux PC, or on any
   other machine affordable for a non-professional).

Let me first say that I consider a Linux PC one of today's fast
machines.  I wasn't talking about a 300MHz Alpha or such...

   The language definition should at least allow that!

I don't see *anything* in my proposal that would prevent this.  In
fact I pointed out that under the proposal you can still get precisely
the behavior you get now -- you only need to replace all but the first
top-level DEFINE for each name with SET!.

I remember you (Axel) complaining in private mail about the
inconsistent behavior of contemporary top-level implementations.  I
think that this is not something that can easily be fixed, because IMO
it is a problem intrinsic to the nature of the distinction between
syntax and values.

   Then: If you decide against an interactive toplevel, you will at least
   need an interactive debugger.  And this debugger should give you the
   ability to evaluate arbitrary expressions in the running system
   (that's even possible in the C world!).

Well -- there is a project. :)

[It shouldn't be too hard to write a metacircular interpreter
augmented with inspecting/debugging/stepping facilities.  Problems
come in as soon as you enter the ``grey'' areas of the language --
unspecified order of evaluation, unspecified function returns.  It is
already hard to understand heavily optimized code in a debugger (ever
tried to debug gcc -O2 code under gdb?), even without these extra
problems.  I have a very hard time to understand the final
intermediate code (just before code generation) of the VSCM compiler
-- call inlining, value propagation, constant folding, beta reduction,
eta reduction, dead variable removal, letrec reordering, ... tend to
thoroughly obfuscate the code.]

   And finally: If you want to use Scheme as an extension language, you
   will very often type expressions interactively.

As I already said -- my proposal doesn't really change anything -- it
just clarifies the *current* behavior of most systems.  I agree with
you that you need a top-level.  For my module system I need a
top-level, because that's where linking (i.e. functor
application) usually takes place.  Did I say remove the top-level?
I don't think so!

Alan Bawden suggested to just remove any mention of the top-level from
the standards documents.  He seems to be afraid that re-discussing
this issue might re-open a can of worms, which was sealed years ago.
It is a pity that Scheme suffers from so much politics.  I'm afraid
the tin is rotten by now and the worms are starting to come out
anyway.

   That's part of what
   extension languages are about.  In most cases, you won't do actual
   programming, but a lot of testing and using.

Perhaps this is just me, but I tend to always type my code into a file
first, because if something goes wrong I can use a text editor to fix
the problems.  Once the 100+ lines saved in xterm are gone it is hard
to recover old code.

Of course you need a top-level for testing and running your code.  But
program development (at least for me) never takes place interactively.

     I think your view may be biased by the fact that you are working on
   a huge scheme program which is non-interactive in nature, namely the
   compiler.

This is exactly the problem: The compiler is the program
*implementing* the interactive top-level.  There are people like you
who complain about its behavior, but I don't know how to change it.
If I do what I think would be The Right Thing then it seems to be in
conflict with R4RS.  This is why I jumped into this debate.

Maybe Alan Bawden is right in demanding to simply *remove* any
language describing the behavior of the top-level altogether from the
standard.  This way all implementations are free to do whatever they
feel is right for them and users are discouraged to rely on any
particular behavior.

--
-Matthias
