On Mon, Jul 02, 2001 at 12:59:51PM -0700, David Whipp wrote:
> Its not quite the same thing, but Java does have the concept of
> anonymous classes (it names them 'inner' classes): Is Perl6 going
> to have a similar concept?

Inner classes and anonymous classes are actually different in Java.
(Anonymous classes are always inner classes; inner classes are not
always anonymous.) An inner class is a class contained within a
class; only the containing class may use the contained class.  An
anonymous inner class is an unnamed instantiation of an interface;
these are often used in places where Perl coders would use a closure.
(Java doesn't have closures.)

Both inner classes and anonymous inner classes exist for reasons
fairly specific to Java; they're very useful in a certain context,
but Perl has other ways to accomplish the same things.

                          - Damien

Reply via email to