Multiple Returns, was Re: Common Lisp style macros inSmalltalk?

Stephan Rudlof sr at evolgo.de
Thu Jan 20 02:13:12 UTC 2000


Lex Spoon wrote:
> 
> PS -- Come to think of it, how about calling it a "record" instead of a
> "tuple"?  Usually a "tuple" is indexed with numbers, just like an array,
> whereas a "record" is indexed by name.  (Can anyone see why I dislike
> having the "overhead" of naming a new class?  It takes me forever!)

What's with calling it "Aggregate_" as prefix, because we have an
aggregation of inst vars and then for the given example:
	Tuple voltage: 220 current: 7.5 startingTorque: 185
->	Aggregate_voltage_current_startingTorque
as classname for a class with inst vars
	voltage, current, startingTorque
and corresponding get/set methods.

If we'd send our specialized aggregate wrong accessor messages we would
get a correct messageNotUnderstood then.

<BTW start>
Problem and solution: Works with '_' as <leftArrow> in class names.
Example:
Object subclass: 'Test_Test' asSymbol
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Test'
works.
<BTW stop>

Stephan
-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list