[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

current ent pseudo-pseudo-constructors



> The constructors I use for Ent loaves are an interesting divergence
   > from the conventions we agreed on at the pseudo-constructor meeting.
   > []

   How about posting the conventions you agreed to, for those of us
   who were disinvited?

Sorry.  Let's see if I can remember them :-)  

Always send pseudo-constructor messages to the class of the
compile-time return type (If you want a Foo, send the message to class
Foo).  If the implementation of the pseudo constructor properly
belongs in another module, the Foo implementation should be Smalltalk
only (conceptually machine generated, but not for awhile) and should
forward all the arguments to the class that actually implements the
p-constructor.  The actual implementation should have the form:  

	'Baz Foo.make: arg'

The Foo preceding the make is the return type embedded in the
selector.  If there is any compile-time overloading of the 'make'
message, all overloadings must have an embedded type
('make.IntegerVar: intVar {IntegerVar}').

If you have special named pseudo-constructors (named after hidden
implementation classes, for example), just use the special name 
(rather than make:).  Thus OrderSpec>ascending returns an OrderSpec
that specifies the ascending order of positions in the Integer
coordinateSpace.

Did I miss anything?
dean