1. 21
  1. 6

    A very interesting and compelling look at the good and bad points of what seems from the outside like a fun-house-mirror language, what we’re used to all weird and warped but still there. Worth a read.

    1. 3

      Perl 6 is like the Florida of computer languages (sorry for the US-oriented refernce). People love to take jabs at it in fun, but there are plenty of good bits to the langauge :)

      1. 2

        An apt analogy! I have family in Florida; it makes a certain sort of lifestyle very easy, but I’m still glad I don’t live there. ;-)

        1. 1

          I actually think people poke fun at Raku because “it’s more Perl than Perl / it’s late / it’s slow / it’s esoteric”. The linked article is a great introduction to parts of it, that may be unknown to even Perl hackers like myself.

      2. 6

        whatever star […]
        (1, 4, 9).map: *.sqrt
        (1, 4, 9).map: { $_.sqrt }
        (1, 4, 9).map: { sqrt($_) }

        All well and good, but I don’t know why you wouldn’t do this the obvious way:

        (1, 4, 9).map: &sqrt
        

        That is, passing the sqrt function directly into the map, rather than creating an anonymous function which passes its singular argument to sqrt.

        1. 2

          Does it work? There is a difference between passing and calling I guess?

          1. 5

            There is a difference between passing and calling I guess?

            Right, that’s what adding the & sigil does. If you try to make the call without the &, then it tries to call sqrt with no parameters and pass the output of that into map, which is obviously an error.

        2. 1

          Does anyone known why Raku is so slow? I tried asking on their IRC channel and didn’t get much information.

          1. 5

            It’s difficult to make fast when there are so many indirections and different ways for control flow go.

            Initial research and effort was put mostly into language semantics and syntax, and development of the first interpreter backend (parrotvm) diverged, so they wrote another one. So even though the language has been in development for 20 years, no one’s been thinking about speed for more than 3 or 4.

            That said, performance has been improving over time and continues to improve (I think there’s even an IRC bot which will benchmark a snippet on two different versions of raku). Although startup time is quite bad (200ms on my system), it beats ruby and python on numeric benchmarks, and is approaching perl’s speed.

          Stories with similar links:

          1. A Review of Perl 6 via tedu 5 years ago | 37 points | 6 comments