what is this method?

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

what is this method?

EstebanLM
I saw this today:

Class>>#private_subclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat

1) method name is not according to conventions (should be #privateSubclass:instanceVariableNames:classVariableNames: poolDictionaries:category:)
2) variable names are not good: t, f, d, s and cat do not means anything.
3) if is private, needs to be in “private” protocol.
4) more than “private” I think it’s function is “basic”… but that’s not a real problem :)

please, a fix?

Esteban
Reply | Threaded
Open this post in threaded view
|

Re: what is this method?

Nicolai Hess-3-2


2015-10-30 12:49 GMT+01:00 Esteban Lorenzano <[hidden email]>:
I saw this today:

Class>>#private_subclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat

1) method name is not according to conventions (should be #privateSubclass:instanceVariableNames:classVariableNames: poolDictionaries:category:)
2) variable names are not good: t, f, d, s and cat do not means anything.
3) if is private, needs to be in “private” protocol.
4) more than “private” I think it’s function is “basic”… but that’s not a real problem :)

please, a fix?

This is my fix for issue
16836  Can't remove an instance variable and a trait in one step

to fix this issue, I had to add another method private_subclass ... between the two
subclass:...
variants, one with a uses-traits and one without the uses-traits name.
If you find a better way, please let me know.
About the variable naming, well I just copied the existing method arg names.
It is not in the "private" category, because it is not private to the trait users that have to implement this.
The method is just called "private_...." because I could not think of a better name.

 

Esteban