On 24 November 2013 00:35, Igor Stasenko <[email protected]> wrote:
>
>
>
> On 24 November 2013 01:20, Esteban A. Maringolo <[email protected]>
> wrote:
>>
>> 2013/11/23 Igor Stasenko <[email protected]>:
>> > On 23 November 2013 21:26, Esteban A. Maringolo <[email protected]>
>> >> >> imo, a better term to use for it would be 'private class' , because
>> >> >> anonymous is a bit fuzzy.
>>
>> >> > I disagree. Anonymous classes is the term that has been used for
>> >> > over
>> >> > two decades. It means, literally, a class that has no name because
>> >> > it is
>> >> > not in Smalltalk (or in a top-level environment if the dialect has
>> >> > namespaces). This is not at all fuzzy. Private class means
>> >> > something quite
>> >> > different, a class that is private to some environment, e.g. a class
>> >> > nested
>> >> > within another class as occurs in SmalltalkAgents or Newspeak.
>> >>
>> >> +1
>> >>
>> >> Anonymous = without name.
>> >> There's not much to add to it.
>>
>> > That's the point. Now what is practical implications of it?
>> > Think, how far you can go with anonymous versus private class.
>> >
>> > If you deny anonymous classes from being private,
>> > then you'll immediately hit many problems with tools,
>> > which working with public classes and expecting them to have a name.
>> > And i don't have to go deep to point on problems: just imagine that you
>> > did
>> > a change to such 'anonymous' class, now since it is public, all tools is
>> > notified about this change, including change logger.. and my question,
>> > what
>> > you going to log into .changes file in such case?
>>
>> I can see your point. But then just say that "Anonymous classes are
>> private".
>> Just don't change the name. Anonymous classes are a well know concept
>> used through piles of literature.
>
>
> I am not after changing names here (for naming sake), but
> more for labeling things properly conceptually.
> Because "anonymous" carries little or no implications regarding tools or
> environment,
> while "private" makes things much more clear. This is why i think it is less
> fuzzy.
Well, surely private classes can have names?
"Anonymous" might imply "private", but you could well hand that class
around, making it "private in the sense that you need to be given a
reference to it".
Anonymity and privacy are separate concerns.
frank
>> E.g. In Java the compiler creates anonymous classes everytime you
>> directly instantiate an Interface.
>>
>> ej myObject.schedule(new Runnable {...});
>>
>> Regards,
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.