develooper Front page | perl.perl6.language | Postings from June 2008

Re: [svn:perl6-synopsis] r14547 - doc/trunk/design/syn

Thread Previous
From:
Ryan Richter
Date:
June 11, 2008 14:42
Subject:
Re: [svn:perl6-synopsis] r14547 - doc/trunk/design/syn
On Wed, Jun 11, 2008 at 02:09:41PM -0700, larry@cvs.perl.org wrote:
> +Note that these differ:
> +
> +    $min ..^ $max    $ min .. $max-1
> +    $min .. ^$max    # $min .. (0..$max-1)

The punctuation looks a little funny on the first line.  Also, are
$min ..^ $max and $min .. $max-1 really the same range?

I'm a little curious about the second line, is that even legal?  It
seems to me a Range should only allow itself to be constructed from
endpoints with a well-defined ordering, so a Range of Ranges should be
illegal.  Or does the .. end up pulling a num out of the ^$max range
iterator for its endpoint somehow via MMD?

-ryan

Thread Previous


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About