[squeak-dev] Object>>className

Eliot Miranda eliot.miranda at gmail.com
Thu Mar 23 21:08:16 UTC 2017


Hi All,

    I find Object>>#className offensive; is methods are far nicer than this
nonsense.  First of all  className is implemented in several Monticello
classes to do what you'd expect; answer the name of a class of some
to-be-imported item such as a method or class definition.  Second, there
are tests out there that simply don't do what a naive reading might expect:

testClassCommentAnnotation
| annotation |
browser selectSystemCategory: browser class category.
browser selectClass: browser class.
annotation := browser annotationForClassCommentFor: browser class.
self assert: (annotation includesSubstring: browser class organization
commentStamp).
self assert: (annotation includesSubstring: 'class comment for').
self assert: (annotation includesSubstring: browser className).

Is it /really/ that hard to write foo class name instead of foo className
and have subclasses prevented from using it easily e.g. when one tries to
do "create inst var accessors" for a class that one has added a className
inst var?  We already have Object>>#name, which is horrible enough.  Ca we
think seriously about nuking Object>>#className?

The grouch.
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170323/fb7a49de/attachment.html>


More information about the Squeak-dev mailing list