Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Wanted: Perl 6 Programmers

by danger (Priest)
on Sep 05, 2002 at 07:35 UTC ( #195304=note: print w/replies, xml ) Need Help??

in reply to Wanted: Perl 6 Programmers

I had to make a couple of minor edits to the files: "anyop.c" and "imcc.y" under the "languages/imcc" path --- the version was hardcoded with 0,0,7 but needs to be changed to 0,0,8 once in each file. I found mention of this on the perl6-internals list. After that, make test in the perl6 directory succeeded on all tests. I just wanted to point that out and possibly save someone a little grief. Time to write some Perl6 code I guess :-)

Replies are listed 'Best First'.
Re: Re: Wanted: Perl 6 Programmers
by d_i_r_t_y (Monk) on Sep 05, 2002 at 14:39 UTC

    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.


      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.
      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).


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2023-03-25 14:42 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.