Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-28 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found