[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
current ent pseudo-pseudo-constructors
- To: <michael>
- Subject: current ent pseudo-pseudo-constructors
- From: Eric Dean Tribble <tribble>
- Date: Sat, 17 Feb 90 23:49:41 PST
- Cc: <xtech>
- In-reply-to: <Michael>,05 PST <9002171214.AA09560@xanadu>
> 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