With mst's help, Method::Signatures can now handle attributes!
method echo($arg) : Whatever { return $arg; }
method $foo($arg) { return $arg; }
*$foo = method($arg) { return $arg; }
method echo($arg) : Whatever { return $arg; }
method echo($arg) : Whatever({ foo => 23 }) { return $arg; }
method echo($arg) : Whatever { return {} }
Re:thanks
schwern on 2008-09-29T13:42:43
Thanks. The plan is to prototype it out in Method::Signatures and then implement it in 5.12.
Re: Devel::Declare in 5.12
markjugg on 2008-09-29T18:47:13
You mean, there are already plans to fold the Devel::Declare magic into 5.12. At least supporting subroutine signatures would be great.
Re: Devel::Declare in 5.12
schwern on 2008-09-30T02:29:40
I mean put in a real method keyword and function signatures straight into the language. No screwing around with tokenizer hacks.
And by "the plan" I mean "my plan". rgs might have something to say about it.
:) Re: Devel::Declare in 5.12
markjugg on 2008-09-30T16:12:59
I frankly get more excited about this kind of evolution that the full Perl 6 upgrade, which I expect will take years longer before I can use it for real work with reasonable performance.
Thanks for the clarification!