Nathan Torkington wrote:
>
> When I was thinking about this very topic yesterday and today, I
> came up with this problem:
>
> @strs = ();
> match /pat/, @strs; # surprise! I'm matching on $_
>
> That is, how do you tell an empty array from no arguments?
Easy: We'll just use lazy evaluation or some other magic.
*snicker* :-)
Honestly, not sure. Although, there are two things I'd say about it:
1. I don't think it's a showstopper for this RFC, since the
feature you are addressing is actually a new piece of
functionality.
2. I don't think it's even closely tied to this RFC itself.
Not being able to tell an empty @array apart from no arguments is a
significant problem right now in Perl. I've always viewed it as such. It
would be really nice if we were able to tell we got a null @array
argument somehow, but I'm not sure how. Sounds like an RFC... ;-)
-Nate
- RFC 164 (v1) Replace =~, !~, m//, and s/// with match(... Perl6 RFC Librarian
- Re: RFC 164 (v1) Replace =~, !~, m//, and s/// wi... Nathan Wiger
- Re: RFC 164 (v1) Replace =~, !~, m//, and s/// wi... Nathan Torkington
- Re: RFC 164 (v1) Replace =~, !~, m//, and s//... Nathan Wiger
- Re: RFC 164 (v1) Replace =~, !~, m//, and... Nathan Torkington
- Re: RFC 164 (v1) Replace =~, !~, m//,... Nathan Wiger
- Re: RFC 164 (v1) Replace =~, !~, m//, and s/// wi... Jonathan Scott Duff
- Re: RFC 164 (v1) Replace =~, !~, m//, and s//... Nathan Wiger
- Re: RFC 164 (v1) Replace =~, !~, m//, and... Jonathan Scott Duff
- Re: RFC 164 (v1) Replace =~, !~, m//, and... Tom Christiansen
- Re: RFC 164 (v1) Replace =~, !~, m//,... Nathan Wiger
- Re: RFC 164 (v1) Replace =~, !~,... Tom Christiansen
- Re: RFC 164 (v1) Replace =~,... Richard Proctor
- Re: RFC 164 (v1) Replace... Michael Maraist
