List Info

Thread: Beginning Style / Approach Question




Beginning Style / Approach Question
user name
2006-08-07 02:48:04


On Aug 6, 2006, at 2:21 PM, nathansobo wrote:
> Is there an idiomatic way of achieving this behavior?

Io's constructor idiom is to avoid constructors when possible.

For example, instead of:

node := SkipNode cloneWithLevels(levels)

do:

node := SkipNode clone setLevels(levels)

The later is shorter in text, clearer, cleaner to implement, and more
flexible.

- Steve

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )