Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Sold! Especially easy sale since I wasn't the one who wanted to put spaces in between my %name and my {key}. :)

I am very excited about the new match objects. These (along with the rest of the RE changes) are going to be a powerful factor in getting people into Perl6, I think.

I get a little nervous seeing the polymorphous $match{key} and then thinking of a not-so-polymorphous %match{key} perhaps appearing next to it in a script. But I suspect this is more to do with objects (references, really) not getting their own sigil, instead references will look like scalars. I suppose one could say I'm still not thrilled with the sigils either way. I will be reading your papers--so at least my obstinacy here has exposed me to more resources-- and maybe I'll change my mind... certainly I don't consider myself a "clueful and competent" programmer, but I do think when there are an infinite number of classes into which an object can fall, having a special notation for just a few of them seems limiting (I count $, @, %, *,and &, but the $ looks like it will still be putting in overtime).

Am I misunderstanding proposed object notation or in Perl6 won't there be some temptation to simply create all hashes and arrays anonymously (based on code seen so far: $match = {}; $match{key} = VALUE; will be valid syntax for what we used to write as $match = {}; $match->{key} = VALUE;)? Is it just my limited knowledge of the subject, or is Perl the only major programming language that goes to this much trouble to put type/class information into the symbols used to represent variables?

And of course no matter how the language ends up looking someone will be unhappy with the changes. It's not a good compromise unless both parties to the dispute feel shortchanged, right? ;)


In reply to (ichi) Re x 6: Apocalypse 5 and regexes by ichimunki
in thread Apocalypse 5 and regexes by c-era

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 admiring the Monastery: (6)
As of 2024-04-23 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found