perl6-language
[Top] [All Lists]

Re: Multiple Return Values - details fleshed out

To: "John M. Dlugosz" <dhcgnd702@sneakemail.com>
Subject: Re: Multiple Return Values - details fleshed out
From: "Jon Lang" <dataweaver@gmail.com>
Date: Sat, 9 Aug 2008 07:49:18 -0700
Cc: perl6-language@perl.org
Delivered-to: mailing list perl6-all@perl.org
Delivered-to: perl6-all-poster@perl.org
Delivered-to: mailing list perl6-language@perl.org
Delivered-to: perl6-language@perl.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=yDG+RQShEHgcmW/TfhkWjjn8M1sLzQZo+hp6x0XR9xg=; b=oEYb1LpL5fHBr9SQfeZ+wX4CM1rA86p2UAK0+q0H/YB/gpCHrPHAhpSjauHpsn5gvP ckMCZEO20IrsHxNFrGWX14MBCoeVebbRgCc1Tmt1BUEOKnFLXelLyDrZ4x1gpPHoY8gd FOK8eY6cDUjmDK0bgud6mfjb0U0hwIQE1Fkd8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=BGX5CGT+RnbSq8dNSSG3a+uj5ZBk5SKYtFC7sVfcfiyu3AOldl23JpFmKThnBUSfxV 01uFin7J9p89HxsycmHHB83zIgOaMO3worHme8HefPd7Bo1QtYUSB9n18GuaLdPYPl2h D88/YoyolfoGbabE9kUdrjDU/wti7Ga3t7O4c=
In-reply-to: <548-83535@sneakemail.com>
List-help: <mailto:perl6-all-help@perl.org>
List-id: <perl6-all.perl.org>
List-id: <perl6-language.perl.org>
List-post: <mailto:perl6-all@perl.org>
List-subscribe: <mailto:perl6-all-subscribe@perl.org>
List-unsubscribe: <mailto:perl6-all-unsubscribe@perl.org>
Mailing-list: contact perl6-all-help@perl.org; run by ezmlm
References: <548-83535@sneakemail.com>
John M. Dlugosz wrote:
> I wrote <http://www.dlugosz.com/Perl6/web/return.html> to clarify and
> extrapolate from what is written in the Synopses.

A few comments:

1. I was under the impression that identifiers couldn't end with - or '.
2. While list context won't work with named return values, "hash
context" ought to.
3. The positional parameters of a Capture object essentially act as a
list with a user-defined index, don't they?  There _is_ some crossover
between the named parameter keys and the positional parameter
user-defined index, in that you ought to be able to provide a name and
have the Capture figure out which one you're asking for.  This works
because there should be no overlap between the keys of the hash and
the user-defined indices of the list.

-- 
Jonathan "Dataweaver" Lang


<Prev in Thread] Current Thread [Next in Thread>