Problems? Is your data what you think it is? | |
PerlMonks |
Re^4: Two more Features Perl 5 Maybe Needsby LanX (Saint) |
on Dec 23, 2008 at 19:13 UTC ( [id://732355]=note: print w/replies, xml ) | Need Help?? |
> with the sigils I would still have to make distinction between a hash and a hash ref
why??? €arr is an arr_ref ¥hash is a hash_ref nothing else. You wouldn't need to use @arr and %hash anymore (but you still could, if you want, it's compatible) > the only thing I would save is an ocassional -> or %{} well following PBP I always try to postfix references with _ref, or sometimes with "_aref", "_href" and "_cref". With more sigils there is no need for this anymore. And "occasional" @{} are really ugly to read. what is easier to read and maintain? for $x ( @{ $hash_ref->{k1}[2] } { ...} or for $x ( @¥hash{k1}[2] ) { ... } as a subconscious proof of bad maintainability I forgot a paren in the first example. You are already used to all these occasional extra symbols, but try to think about beginners who struggle to understand them and eventually switch to other languages. I can understand that symbols beyond char 127 are not optimal, but the perlparser is so overloaded with antique features and patches that you can't move a millimeter anymore. Just have a look at how complex it is to allow slices with hash- and array-refs! Slicing with Arrow-Operator possible in 5.12? This could be cleaned up with € and ¥. And contrary to perl6 my approach is still compatible, because you can transform them back into standard perl5. Cheers Rolf
In Section
Perl News
|
|