Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: What's wrong with Perl 6?

by herveus (Parson)
on May 11, 2007 at 11:42 UTC ( #614878=note: print w/replies, xml ) Need Help??


in reply to Re^2: What's wrong with Perl 6?
in thread What's wrong with Perl 6?

Howdy!

That objection seems to be grounded in some ignorance (in the technical sense of simply not knowing).

It is not unheard of for a major version change to favor new/better features over backward compatibility. If I recall correctly, help with smoothing the path from Perl 5 to Perl 6 is part of the effort. Further, while there are significant changes and (one hopes) improvements in the upgrade, the language appears to look Perlish, much in the manner that a Mustang looks like a Mustang, even through multiple iterations of style. There are key elements that say "I'm a Mustang" or "I'm Perl".

Further, it is not clear that Perl 5 will die anytime soon. One can expect an extended period where both versions are being developed. People with considerable investments in Perl 5 code will tend to be reluctant to jump on the Perl 6 bandwagon right away. Others will simply be leery of change. There will probably remain a considerable mass of interest in Perl 5 for some time.

I'm grateful that Perl 6 is simply the next major version of Perl. Perl++ or Perl# would be Just Wrong. 6 is the next number after 5. Skipping to 16 would be another piece of "my version number is now bigger than yours" tomfoolery (Sybase, anyone?)

yours,
Michael

Replies are listed 'Best First'.
Re^4: What's wrong with Perl 6?
by Cap'n Steve (Friar) on May 13, 2007 at 05:09 UTC
    It's funny that you compare it to the ugly new Mustangs. You're right that it looks Perlish, but looking at this example from this article, my first guess would probably be Ruby or maybe Java (I don't actually use either of those languages) since the only real clue to its Perlness are the variable symbols, which apparently are used opposite to the way we're used to.

    I haven't been programming Perl for that long, but was the change from 4 to 5 anywhere near this dramatic? I know PHP 4 to PHP 5 wasn't a huge deal, and I don't think VB 5 to VB 6 was either.
      It's funny that you compare it to the ugly new Mustangs. You're right that it looks Perlish, but looking at this example from this article, my first guess would probably be Ruby or maybe Java

      That is an example that exhibits explicit features related to Perl 6's OO system. The code is not all that different from Perl 5 (roughly) equivalent one except for some syntactical bits, and the fact that in the latter you should build yourself some stuff that in this case is instead part of the language.

      For "normal" usage, whatever that is, I can't see e.g.

      .say for =$fh;

      as being significantly less perlish than

      print while <$fh>; # assuming $\="\n"

      I would rather say: differently so.

      OTOH I'm glad to be able to do e.g.:

      pugs> sub postfix:<!> (Int $n) { [*] 1..$n } undef pugs> say $_! for ^6 1 1 2 6 24 120 undef

      (As you can see this has the advantage of being able to be already run under pugs - it is also quite about the only thing I can do! :-)

      Even in the example code you presented, though, there are many bits that IMNSHO are very perlish, although also very different from current Perl look and feel:

      • Perl's typical way to do things implicitly on the $_ pronoun, in this case by means of "unary" dot;
      • Perl's dwimmery fashion with 0 < $rank < 10 which is more clear and concise than the full expression comprising a logical operator.

      Also see the following portion of a recent clpmisc thread (link @ GG):

        Well, I guess we have different definitions of "Perlish". I was thinking "similar to past versions of Perl" and you seem to be thinking "conforms to the Perl philosophy". With your example of .say for =$fh;, once again the only thing that I would call Perlish about that is the dollar sign, and if you changed the variable name I'd have no clue what it does.

      An almost complete aside from the purpose of this thread, but it comes as a direct result of seeing a little real-world(ish) Perl 6 code posted here.

      I can see that pieces of code like this from above are likely to be quite common in Perl 6 class implementations:

      ($.name, $.rank, $.pref) = ($name, $rank, $cereal_pref);

      Ie. The assignment of batches of named formal parameters to instance variables with the same (similar, the $.pref/$cereal_pref disparity not withstanding) names. And vice versa.

      Is there any shorthand available for this kind of 'batch assignment' from method parameters to instance variables?

      I was thinking along the lines of $.= ( $name, $rank, $pref );

      and say $= ( $.name, $.rank, $.pref );

      Is there any mileasge in that?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        IIRC, naming your method parameters as if they were instance variables accomplishes that trick:

        method foo($.name,$.rank,$.pref) { ... } # and then later ... $obj.foo('Scott', 'Vicar', '???'); # sets the instance vars
        Though pulling out the auto-magic into something you can do directly is interesting.

        Check S12 in any case for the definitive answer.

Re^4: What's wrong with Perl 6?
by mpeppler (Vicar) on May 11, 2007 at 13:54 UTC
    Sybase "only" went from almost 5 (4.9.2) to 10, and from 12.5 to 15... MS went from 7 to 2000 :-)

    Though I still agree with you.

    Michael

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-01-17 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?