On 4/22/04 5:33 PM, Aaron Sherman wrote: > On Tue, 2004-04-20 at 10:51, John Siracusa wrote: >> Hm, so how would the "is required" trait that Damian posted work? Would it >> simply be shorthand for a run-time check that I don't have to write myself? >> I was under the impression that it would work the way I described earlier: >> >> sub foo(+$a is required, +$b is required) { ... } > > Your example is a non-multi sub, which AFAIK means that you can do this > at compile time. But for multis and methods, I think Larry and Dan's > comments still hold. > > The likelyhood that P6.0.0 will make this distinction is another thing. > I'd rather have a language that works than one that is complete. Plenty > of time to complete it later, but those who are thinking of taking on > large-scale development with it (e.g. converting over large CPAN modules > or implementing new Perl6ish libraries) just want something that runs :)
Yes, it appears that runtime checks for the existence of required params will continue to be a necessary part of Perl programming. I suppose a saving grace is that Perl 6 will support "real" assertions that disappear entirely from the program flow when a switch is flipped. -John