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


in reply to Re: (ichi) Re x 4: Apocalypse 5 and regexes
in thread Apocalypse 5 and regexes

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? ;)