introspection (and Perl 6)
jns at gellyfish.com
Tue Jan 22 07:16:40 GMT 2008
On Mon, 2008-01-21 at 21:04 +0000, Aaron Trevena wrote:
> On 21/01/2008, Ovid <publiustemp-londonpm at yahoo.com> wrote:
> > --- Aaron Trevena <aaron.trevena at gmail.com> wrote:
> > > On 21/01/2008, Jeff Anderson <captvanhalen at gmail.com> wrote:
> > > > $class.^can('foo')
> > > >
> > > > That syntax is nearly as elegant as mud is not. :P
> > >
> > > Yes - what's wrong with just having a can method, it's say not ^say,
> > > so why the silly hat?
> > I think the problem here is that when you universally shove things into
> > all objects, you force your changes on everyone.
> > $class.^can('foo');
> > That's actually shorthand for:
> > $class.HOW.can('foo');
> Kinda neat. :)
> I don't mind the hat as long as it's shorthand for golfers that I'll
> never need to use or read in production code.
But why have it in the first place, appeasing "golfers" is surely not
one of the design goals of the language.
And you know that you *will* see it in production code. That is assuming
you ever see any Perl 6 production code.
More information about the london.pm