On Tue, Oct 30, 2001 at 03:59:30PM +1100, Damian Conway wrote:

> (Though I *do* harbour a secret desire to resurrect -> as a type specifier:
> 
>       sub foo (@args) -> rettype

Hmm... I would have expected "is" to come in here:

        sub foo (@args) is IO::Handle

>       my $bar -> int;

Hmm... This, I think is very different. Now you're getting into
casting, and I fear a Perl6 that has casting. Next, we'll have to
start considering the various types of casting that C++ provides
(static, dynamic, etc).

Did you think of -> as forcing the "my" expression to return a certain
type or to say that $bar is of type int or to say that $bar is whatever
it is, but will always be forced into an int when its value is taken
(much like the behavior of Perl6 hash keys)?

I could see each of those being useful, but I'm not sure they are
all neccessary.

-- 
Aaron Sherman
[EMAIL PROTECTED]             finger [EMAIL PROTECTED] for GPG info. Fingerprint:
www.ajs.com/~ajs        6DC1 F67A B9FB 2FBA D04C  619E FC35 5713 2676 CEAF
  "Write your letters in the sand for the day I'll take your hand
   In the land that our grandchildren knew." -Queen/_'39_

Reply via email to