2014-06-25 12:06 GMT-03:00 Norbert Hartl <[email protected]>: > Am 25.06.2014 um 16:55 schrieb Esteban A. Maringolo <[email protected]>: > I don't like over descriptive class names. Because they restrict you > from using it for other, unexpected, purposes or contexts.
> The question to me is why this is "over descriptive". We have a tradition > here to be descriptive and intention revealing. It happens everywhere except > when it comes to instance variables it is instVarAt: instVarNamed: etc. I > never liked them. I agree with you here, it is like those instVar* selectors are obfuscated only to show they are "low level stuff". > Another question might be the usage context. Why is it called > InstanceVariableSlot anyway? Is there a difference if the slot is attached > to the instance side or class side? Isn't it really just a VariableSlot? The > context for the instance is where it is used. Asking an object for instance > variables and class instance variables could just return a collection of > VariableSlots, no? "Simplicity is the ultimate sophistication", so finding a good intention revealing selector is not an easy task. But IMO the naming is as important as other factors, because you'll keep referring them in many contexts, and that will help build good mental models. I like how VariableSlot sounds. But aren't slots meant to be used always in the context of variables? If so, Variable might be read as an attribute (that varies, in shape, etc.). Many of us are non native speakers, so this is an important factor too. Regards!
