I'm normally too lazy to always type the dereference operator ->
Sounds to me like you are really asking for auto-dereference, so that $a is interpreted as $a->
While auto-magically defining my $name = \@name would simulate something like that, I think it just introduces too many other problems.
Even assuming that the same symbol name is not reused for other types of variables (a good practice in general), is implicit dereferencing a scalar variable really a safe thing to do? If not, then this feature would be setting up Perl beginners for problems when implicit dereferencing needs to be disabled.
|Replies are listed 'Best First'.|
Re^2: Unifying namespaces of @name and $name to simplify dereferencing?
by LanX (Archbishop) on Mar 27, 2016 at 23:05 UTC
by RonW (Parson) on Mar 30, 2016 at 01:12 UTC