in reply to Five Features Perl 5 Needs Now
6. Builtin easy aliasing of lexicals:
something like:
such that beginners don't need to learn dereferencing straight away, just because they have nested data structures or want to return them from a sub.sub get_hash { my %h; ... ;return \%h} my (*h2)= get_hash(); #I'm not sure about the best syntax print keys %h2;
7. Introducing optional extra Sigils for Hashes and Arrays which behave like the sigils in perl6, that means representing the reference not the list!
I know finding appropriate symbols in all charsets is complicated, but this could facilitate forward compability to perl6, if perl6 could then use these symbols as alternative aliases for @ and %.¥hash{key1}{key2}=$hash{key1}{key2}; €arr1[0]=€arr2; # => €arr1[0][0] == €arr2[0]; push €arr1[0], "string"; # => pop €arr2 == "string";
just ideas ...
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Two more Features Perl 5 Maybe Needs
by Jenda (Abbot) on Dec 21, 2008 at 23:34 UTC | |
by LanX (Saint) on Dec 22, 2008 at 04:11 UTC | |
by Jenda (Abbot) on Dec 23, 2008 at 16:45 UTC | |
by LanX (Saint) on Dec 23, 2008 at 19:13 UTC | |
by chromatic (Archbishop) on Dec 23, 2008 at 19:29 UTC | |
| |
by Jenda (Abbot) on Dec 23, 2008 at 21:55 UTC | |
| |
|
Re: Two more Features Perl 5 Maybe Needs
by jdporter (Paladin) on Dec 21, 2008 at 01:48 UTC | |
by LanX (Saint) on Dec 21, 2008 at 02:48 UTC | |
by Your Mother (Archbishop) on Dec 21, 2008 at 18:57 UTC | |
by LanX (Saint) on Dec 21, 2008 at 19:19 UTC | |
by jdporter (Paladin) on Dec 21, 2008 at 19:38 UTC | |
|