At 04:18 PM 7/2/2001 -0400, Michael G Schwern wrote:
>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?
>
>Are they really necessary?  You can get the same effect so many other
>ways in Perl already, inner classes seem to be a way around alot of
>Java's BSDM features, like interfaces.

The example I was thinking about for this was what we're going to be doing 
for perl scalars. (Poor use of the terminology on my part is probably 
responsible for a good chunk of the heat in this)

With scalars, we're going to have a bunch of special-purpose functions 
instead of one general-purpose function and a bunch of flags. (Avoids lots 
of conditional tests--conditionals are bad, they kill pipelines and shoot 
performance) I was thinking of something similar for objects. Instead of a 
bunch of properties and one general-purpose method, you use the right set 
of methods (by twiddling ISA, though it probably ought to be called DOESA 
or ACTSLIKEA for this) and don't check the properties.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to