Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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.
class Staff::Record { has Str $.name; has Int $.rank; has Hash $.pref; method CREATE(Str $name, Int $rank, Hash $cereal_pref) { .check_rank($rank); ($.name, $.rank, $.pref) = ($name, $rank, $cereal_pref); } method name() returns Str { return $.name; } method rank() returns Str { return $.rank; } method rank(Int $new_rank) { .check_rank($new_rank); $.rank = $new_rank; } method check_rank(Staff::Record $obj: Int $rank) is private { die "Invalid rank for $obj.class() object: $rank" unless 0 < $rank < 10; } # Other methods here }

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.

In reply to Re^4: What's wrong with Perl 6? by Cap'n Steve
in thread What's wrong with Perl 6? by duff

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2021-01-17 12:28 GMT
    Find Nodes?
      Voting Booth?