2009/12/25 Igor Stasenko <[email protected]>: > 2009/12/25 Stéphane Ducasse <[email protected]>: >> >> On Dec 25, 2009, at 3:39 PM, Igor Stasenko wrote: >> >>> 2009/12/25 Stéphane Ducasse <[email protected]>: >>>> Hi >>>> >>>> I was wondering if it would make sense to have >>>> Point name >>>> Point class name >>>> both returning a symbol and not in one case a symbol and the other >>>> a string. >>>> >>> >>> To my understanding, there's only classes which obliged to be >>> identified by name. >>> Metaclasses don't need to have one, and actually free to answer >>> anything they want. >> >> I do not think so and be consistent would be good > > The need to have class names comes from using the global namespace: > > (Smalltalk at: ConsistentClass name) == ConsistentClass > > metaclasses is not part of global namespace and therefore don't > required to have some constraints in > while answering #name message. > > Actually, it could answer 'ClassName metaclass' , or just 'a Metaclass' > any form is acceptable. > I'd rather punish those, who in own code expecting that metaclasses > should answer something which can be parsed for detecting a class > name! > Because the right form of accessing the name of class is:
classOrMetaClass theClassSide name and right form of testing if behavior is metaclass is object isBehavior and: [ object isMeta ] but not: object name endsWith:'class' :) > >>> >>>> Stef >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [email protected] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> >>> >>> -- >>> Best regards, >>> Igor Stasenko AKA sig. >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [email protected] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
