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

Re: [sc-dev] Node classvar addActions should have a getter

On Saturday, Nov 20, 2004, at 12:19 US/Eastern, Julian Rohrhuber wrote:

Otherwise, I have to redefine the dictionary in other methods that might need to turn an addaction into a number.

Can I commit it?

it might be sematically clearer to add a method:

*addActionToNumber { arg key;


*actionNumberFor { |addAction = \addToHead| ^addActions[addAction] }

The word "add" is used as the first part of so many method names -- intended as a verb -- that it would be confusing to call it addActionToNumber.

Node.addActionToNumber(\addToHead) -- what are you adding, and why is the argument not a number?

Node.actionNumberFor(\addToTail) -- English!


H. James Harkins /// dewdrop_world

"If attacked by a lion, thrust your arm down his throat.
This takes some practice." -- Cyril Connolly