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: TSa <Thomas.Sandlass@barco.com>
Date: Fri, 08 Aug 2008 17:12:12 +0200
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: <1478-42616@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: <1478-42616@sneakemail.com>
HaloO

John M. Dlugosz wrote:
I was trying to figure out exactly how Captures manage to stay invisible even though functions return them, yet still let you use Capture objects when you want to. Please see my conclusions at <http://www.dlugosz.com/Perl6/web/return.html>. The Summary at the very bottom clarifies the Synopses.

I like the concept of auto-collapsing ReturnCaptures. It reminds me
to my idea of an AssignmentProxy as discussed in "assignable mutators
(S06/Lvalue subroutines)". If such a ReturnCapture could also be
preliminary of some kind, then lvalue subs could be lazily resumed when
the rvalue comes in. 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?

Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan


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