perl6-language
[Top] [All Lists]

Re: Some details of function return captures

To: perl6-language@perl.org
Subject: Re: Some details of function return captures
From: "John M. Dlugosz" <dhcgnd702@sneakemail.com>
Date: Fri, 08 Aug 2008 18:32:35 -0500
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
In-reply-to: <489C624C.1080704@barco.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: <1478-42616@sneakemail.com> <489C624C.1080704@barco.com>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
If such a ReturnCapture could also be
preliminary of some kind, then lvalue subs could be lazily resumed when
the rvalue comes in.
Can you elaborate on that?  I don't follow.



Also infix:</> needs a lazy item that is collapsed
into Int, Num or Rat depending on the constraint of the container it
ends up in eventually. An Any gets the Rat. Hmm, and a Str perhaps the
two constituting Ints as fraction put into lowest terms?
I don't think you need something that fancy. If / produces a Rat, then subsequent assignment coerces the value to a Num, you get the correct result because Rat is exact. Likewise converting to Int would give the same result as int division would have in the first place. And stringifying produces a Str.

--John


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