Method names

sqrmax at cvtci.com.ar sqrmax at cvtci.com.ar
Sun Nov 1 22:35:25 UTC 1998


Hi.

Messages usually have the arguments last. Wouldn't it be nice to have 
messages that could have arguments between a phrase? Example:

	aBitStream next: 40 bits

Here, bits is a nop. In this way, things get written more clearly and yet 
they don't become complex (like implementing the nop method #bits in Integer). 
Or maybe another pattern of keyword message, keyword+nops. The nop can be 
identified and  ignored by the compiler (and humans) if a proper text attribute 
is used, for  instance. The example without the nop method names gets like 
this:

	aBitStream next: 40

Or maybe:

	aBitStream nextBits: 40

which is not nice. These nops could be called something like parameter 
descriptors... does this go against polymorphism and the untyped Smalltalk???

Andres.





More information about the Squeak-dev mailing list