A Proposal for Project Layers

David Farber dfarber at numenor.com
Wed Nov 17 04:19:37 UTC 1999


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