http://www.perlmonks.org?node_id=80787


in reply to Re: Exegesis 2 - Perl 6
in thread Exegesis 2 - Perl 6

In order.
  1. Optional typing systems are a nice idea, but I doubt they will be used much. For instance if you properly declare things in Common Lisp, it is supposed to be as fast as C. But most people don't do that, and those who do occasionally get good foot-shootage out of it. Besides which, the performance gains will probably not really materialize for a couple of iterations.
  2. The global variables were ridiculous. The only one I would miss is $!. I am used to typing that...
  3. Changing the arrow syntax brings Perl in line with the syntax used by virtually all other languages. And backwards compatibility is not an issue since Perl 5 code will run through the translator which supports the old syntax.
  4. The fallback goes the other way. You are making a method lookup and it falls back to a hash lookup when no such method is found.
  5. Again you have what Damian said exactly backwards. Perl will go from methods not saying what you get but everything else saying what you will get to having nothing say what you will get. So I suspect that if something like @object.method() is on the horizon it will be something like map {$_->method()} @object is today...

Replies are listed 'Best First'.
(tye)Re2: Exegesis 2 - Perl 6
by tye (Sage) on May 16, 2001 at 10:24 UTC

    1) The real win advertised (to my reading, which was a bit between the lines) was that something of type "int" would take up less space, so I doubt that will take interations to get working. Speed improvements may also eventually come (or not).

    3) But how do you concatenate strings in Perl 6?

            - tye (but my friends call me "Tye")
      First you are right about the real reading of the win. But I think that their first implementation should just work without much worrying about optional optimizations at all. Attempts to have multiple things that could be scalars should be a second pass. Attempts to become smart about it (and not promote those ints to full scalars at the first moment) might take a while.

      As for the third point, Larry will have to decide on a string concatenation operation other than the current. Personally I can learn a new concatenation operation fairly easily. As long as he doesn't pick +, I won't really care what he does there...

        As for the third point, Larry will have to decide on a string concatenation operation other than the current. Personally I can learn a new concatenation operation fairly easily. As long as he doesn't pick +, I won't really care what he does there...

        This point seemed a bit confusing to me, being that so many languages already use the + operator for both addition and string concatenation, why would you be opposed to using + for this particular operation?