develooper Front page | perl.perl6.language | Postings from July 2002

Re: what's new continued

Thread Previous | Thread Next
From:
Damian Conway
Date:
July 7, 2002 14:20
Subject:
Re: what's new continued
Message ID:
3D28B078.4304AE11@conway.org
Ashley Winters asked:

> > It *might* possibly work to hyper the constructor:
> >
> >     my ($a, $b) = ^new Foo
> 
> Would prefix ^ always return 'wanted' number of repetitions? Like a
> smart C<x Inf>?


This does bother me about the above proposed syntax/semantics. Hyperoperations
take their "magnitude" from that of their operand(s).
I would have expected the above example needed to be:

	 my ($a, $b) = ^new (Foo,Foo);

or maybe:

	 my ($a, $b) = ^new Foo x 2;

Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About