Indeed. Same for listeners etc.

Anonymous class has indeed a very clear meaning to me and to any student
that has been exposed to Java (which means "a huge lot").

Phil


On Sun, Nov 24, 2013 at 1:20 AM, 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
> >onyl> > 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.
> E.g. In Java the compiler creates anonymous classes everytime you
> directly instantiate an Interface.
>
> ej myObject.schedule(new Runnable {...});
>
> Regards,
>
>

Reply via email to