Hi Norbert,
On Jan 13, 2018, at 3:32 AM, Norbert Hartl <norbert@hartl.name> wrote:
Iâm not the biggest fan of method categories/protocols but I try to. What strikes me is the huge mess in names we have. Everytime I create e.g. an initialize method Iâm asking myself which is the proper name to choose
initialize initializing initialization â¦.
Do we have a convention for this?
Right now all names starting with init are
initialization-data initialize-destroy initialization-filter initialize - release initialize initialization-union initialize - event initializing initialization initalize-release initailize-release initialization widgets initalize initialize-release initialization-release
Funny. Your list (of course) omits one of the best: instance initialization In the original Smalltalk-80 the one used was initialize-release because the system, having a reference counting garbage collector, needed explicit cycle breaking for garbage to be reclaimed and so there were some important release methods in the compiler and the GUI. But these became obsolete when scavenging was introduced, and so in the parcplace code instance initialization started replacing initialize-release. I think protocol names should use the passive voice since the active voice suggests specific usage. So initialization is better than initialize et al. And it would be nice to have tool support to suggest protocol names to maintain consistency so that the same selector usually appears in the same protocol. Spelling rorres are intivetible and should be fixed when found.
Norbert