On Thursday, March 13, 2003, at 01:05 PM, Austin Hastings wrote:
More to the point:

type sigfunc is interrupt is reentrant;

sub sig_ign() is sigfunc {...}
sub sig_kill() is sigfunc {...}
sub sig_intr() is sigfunc {...}

This is WAGging based on A6, but I guess I see things like this as being implemented by making subs that inherit from subs:


class sigfunc is sub (...default signature...) is interrupt is reentrant;

   sub sig_ign(...alternate signature...) is sigfunc {...}
   sub sig_kill is sigfunc {...}
   sub sig_intr is sigfunc {...}

sigfunc sig_foo {...} # could you also say it like this, I wonder?

Since C<sub> is itself a class, you can subclass it. And since A6 indicates that the signature, traits, and even implementing body are just properties of a given C<sub> "object", you should be able to override them individually if you want, for example, an alternate signature. At least, I'm hoping something like that works -- there's a lot of guessing there.


type null but defined but false;

...
return undef but null;

Hmm... I'm not entirely sure how that works for runtime properties... but what about


class null is void but defined but false;

return undef but null;

Would something like that that be OK? Essentially using 'void' as a marker that you're defining a (heh) classless class? I'd really like to avoid making a separate keyword for combining traits, I'd love for it to just use the normal class inheritance mechanisms.


class CatTable is Hash of Array of Array of Hash of Array of Cat;

my %pet is CatTable;
sub feed (%cats is CatTable);

MikeL




Reply via email to