Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Wanted: Perl 6 Programmers

by d_i_r_t_y (Monk)
on Sep 05, 2002 at 14:39 UTC ( [id://195392]=note: print w/replies, xml ) Need Help??


in reply to Re: Wanted: Perl 6 Programmers
in thread Wanted: Perl 6 Programmers

thanks for the advice mr danger -- i checked out a CVS copy, and needed to twiddle the version number as well.

have to say, i'm excited... even by my first for loop - parallel iteration is cool! likewise with the hyper operators - just like an even more brief map {} LIST. um... not sure about _ for concatenation though... call me a heretic, but i'd prefer an overloaded '+' to concatenate strings and '*' to repeat strings (a la perl5 'x' operator)... more parametric polymorphism please...

print "hello perl6 world\n"; my int @list1 = ( 1 .. 10 ); my int @list2 = @list1 ^* 2; my int $i = 0; for @list1; @list2 -> $a; $b { print "list iteration " _ ++$i _ ": a is " _ $a _ "; b is " _ $b _ "\n"; }

this works! although the contents of @list2, once hyper-doubled, appear to be (ie they print as) floating point numbers. nevertheless, this is extremely exciting.

matt

Replies are listed 'Best First'.
Re: Re: Re: Wanted: Perl 6 Programmers
by educated_foo (Vicar) on Sep 05, 2002 at 15:20 UTC
    although the contents of @list2, once hyper-doubled, appear to be (ie they print as) floating point numbers.
    You are correct -- numeric hyper-operators always convert their operands to floating-point in the current implementation. This behavior is incorrect.
    /s
Re: Re: Re: Wanted: Perl 6 Programmers
by Anonymous Monk on Sep 05, 2002 at 19:25 UTC
    You're a heretic. :)

    Personally, I *HATE* it when + is overloaded as string concatenation. It leads to too many bugs/verbosities where you need to tell the language "no, I wanted addition here", or "no, I wanted concatenation here", especially in a language like perl which is able to DWIM-convert strings to numbers and verse visa.

      I agree that overloading + is bad in this particular language, because the values aren't typed.

      But, Perl doesn't need an explicit concatenation operator at all! Just use interpolation, "$head$tail" works perfectly well. For expressions, it's possible in Perl5 and easy in Perl6.

      So, just get rid of the thing (or boycott it).

      (ducking)
      —John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://195392]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found