[squeak-dev] Object>>className
Chris Muller
asqueaker at gmail.com
Thu Mar 23 22:12:54 UTC 2017
What I WOULD like to have, though, is an extra level of indirection
for everywhere in the system that sends #class. We have
Object>>#xxxClass but I would like to rename it to something nicer
like #actualClass before changing senders...
On Thu, Mar 23, 2017 at 4:08 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 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
>
>
>
More information about the Squeak-dev
mailing list
|