order classVar in Stepper is suspect

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

order classVar in Stepper is suspect

Nicolas Cellier
Hi,
there is a class variable named order in Stepper.

First, it is well behaved to capitalize class var names

Second, I think there is a confusion between class variable and class side instanceVariable.
A class var is shared between all subclasses, and it's clearly not what we want here: each subclass should have its own order.

Third, finally, we don't need no class instance variable at all right now, because every subclass redefine order (the message).
So I suggest removing order (the class var) and implement order ^self subclassResponsibility in Stepper.

What do you think?

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: order classVar in Stepper is suspect

Nicolas Cellier

On Wednesday, April 30, 2014 1:01:38 AM UTC+2, Nicolas Cellier wrote:
Hi,
there is a class variable named order in Stepper.

First, it is well behaved to capitalize class var names

Second, I think there is a confusion between class variable and class side instanceVariable.
A class var is shared between all subclasses, and it's clearly not what we want here: each subclass should have its own order.

Third, finally, we don't need no class instance variable at all right now, because every subclass redefine order (the message).
So I suggest removing order (the class var) and implement order ^self subclassResponsibility in Stepper.

What do you think?

Ah, I see that the tests rather expect ^nil than self subclassResponsibility for #order
And I see also that #order is purely informational, and is not used by ODE.
Is it useful?

--
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.