GC considered incompatible with low-level programming
Nathan Hawkins
utsl@one.net
Sun, 28 Apr 1996 15:28:25 -0400 (EDT)
On Sun, 28 Apr 1996, Eric W. Biederman wrote:
>
> No this isn't as ridicolous as the now famous
> "goto considered harmful" thing by Dijstraka.
>
> >From listening to our discussions, and looking at some of my one code
> to implement some of my ideas it appears to me that low-level-coding
> is incompatible in goals at least with having built-in garbage
> collection in the language.
>
> No one hardly wants to program in assembly language.
> Why because it's a lot of work and you must be real familiar with the
> machine, and most of all it's really hard to restructure your code if
> you change your mind.
I guess I'm no one, now. ;-)
> A low-level language is constructed to make the task of programming on
> a machine easier and to some extent more portable. That is to bang on
> the hardware. It has powerful constructs to make that job easier.
> One of the most important of these is programmer beware, and no type
> safety none! To have a garbage collector implies at least a little
> type safety so try to shoe horn it in at such a low-level is silly, or
> from utsl:
>
> This is an important part of what I like about Forth. Forth's very lack
> of stack frames is one of it's greatest strengths, IMHO. Sure, you can
> mess up, but that's true of all good languages. ;-) I wouldn't want to
> work in an idiot-proofed language, since I would probably be prevented
> from doing most of the things I want to do.
First of all, there is a difference between having stack frames and type
safety! Stack frames do not require type safety, nor does type safety
require stack frames.
Second, let's wait a little while before we give up on the current plan.
Before we accept your claim (GC considered incompatible with LL
programming), why don't we prove you right or wrong experimentally.
(This will prove you're not acting like Djikstra. ;-) That is, try to do it,
then see if it's impossible. Also, as a last resort, we could always
develop an environment where hand-written LLL isn't GC-ed, but HLL output is.
Also, GC isn't in exactly the same class as the idiot-proofing I'm
refering to. By that, I mean that a language shouldn't be designed to
prevent the programmer from making mistakes. GC doesn't, in fact, do
this, rather GC exists to clean things up, regardless of mistakes.
The whole point of this list, is to discuss ways of implementing the LLL.
At present, we're still exploring the Forth+GC concept. I'm not ready to
give up yet, since I don't know that much about GC implementation yet.
*utsl*