A Proposal for Project Layers

Les Tyrrell tyrrell at canis.uiuc.edu
Wed Nov 17 04:56:51 UTC 1999


Like I said before- this was already demonstrated a few months ago,
though in VisualWorks and not yet in Squeak.  Not these particular
definitions, but it would have made no difference.  And not the Java
bit- you can rest assured that no Java bit was in my test case.
However, that does make for an interesting use case that I haven't
considered- all my thinking has been around a single language
perspective.  In that case, it is sufficient to modify the base to
handle modularity and a single language.  I'll have to give some
more thought to how one would handle differing languages ( it
might be trivial, an inherent property of the existing Oasis system,
but I haven't tried that yet ).

The tools for building the modules exist outside their scope- thus
you have no trouble redefining things, even if they are traditionally
very well known or even vital.  

Although I did make use of an excellent property of nil in VisualWorks-
otherwise it would have bombed on the first message sent to an instance
of the class corresponding to "Object" in your example.  I almost suspect
that someone at ParcPlace ran into that problem before...


----- Original Message ----- 
From: David Farber <dfarber at numenor.com>
To: <squeak at cs.uiuc.edu>
Sent: Tuesday, November 16, 1999 10:19 PM
Subject: Re: A Proposal for Project Layers

> 
> i'm not saying that the following file in would actually work, but i could
> imagine wanting to do something like:
> 
> !nil subclass: #Object
> instanceVariableNames: ''
> classVariableNames: ''
> poolDictionaries: ''
> category: 'java.lang'!
> 
> !Object subclass: #Float           "actually, Float in Smalltalk is a "
> instanceVariableNames: ''   "variableWordSubclass, but i don't know what "
> classVariableNames: ''      "that is all about."
> poolDictionaries: ''
> category: 'java.lang'!
> 
> !Float methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:22'!
> + aNumber 
> "Primitive. Answer the sum of the receiver and aNumber. Essential.
> Fail if the argument is not a Float. See Object documentation
> whatIsAPrimitive."
> 
> <primitive: 41>
> "No error handling yet so we just die."! !
> 
> 
> then, with a sufficently hacked compiler i might just be able to type the
> following into a workspace and do it:
> 
>   java.lang.Float i;
>   java.lang.Float j;
>   Smalltalk.Numeric.Float k;  // so i don't have to implement printOn: just
> yet
>   i = new Float(3.0);
>   j = new Float(4.0);
>   k = i + j;
>   Smalltalk.Transcript.show(k.asString()).cr();
> 
> hmmmm...if we ignored all the typing, we should be able to do a naive
> translation to:
> 
>   | i j k |
>   i := 3.0.
>   j := 4.0.
>   k := i + j.
>   Transcript show: k asString; cr.
> 
> just a thought...and not that i would really need a completely empty
> project to do this; it is just an aesthetic quirk.
> 
> david
> 
> 
> At 11:24 PM 11/15/99 -0500, you wrote:
> >>[I won't have time to really go over the proposal until the morning bus
> >>commute tomorrow, so my apologies if my question has an obvious answer.]
> >>
> >>So, it looks to me like we'll be able to *include* all the things we'd like
> >>in Project Layers, but how facile will they be with *excluding* stuff. at
> >>the ultimate extreme i really would like to be able to create a Project
> >>with *nothing* in it. No Object. No Collections. Nothing. I would, of
> >>course, still like to be able to use the standard tools (browsers,
> >>filelists, workspaces) in the totally empty project.
> >
> >How, exactly, could one evaluate "3+4" in such a project, let alone 
> >run MVC, morphic or a browser?
> >
> >
> --
> David Farber
> dfarber at numenor.com
> 





More information about the Squeak-dev mailing list