On Thu, Aug 17, 2000 at 03:10:44PM -0700, Steve Fink wrote:
> My proposal would be what I implemented for perl5 a while back (Sarathy
> didn't dislike it, but wasn't convinced enough to put it in): all
> dereferencing can be done with ->.
> 
> $x->@ is the same as @$x
> $x->% is the same as %$x
> $x->@[1,2,3] is the same as @$x[1,2,3]
> $x->@{a,b,c} is the same as @$x{a,b,c}
> f()->@ is the same as @{ f() }

The big objection to this is that this destroys one of the great
advantages of the current punctuation: the ability to tell the
context of an expression by examining the first character.

  @{$foo{@bar{1..20}}

The above is complex and filled with line noise, but one glance tells
me that the result is a list.  If you look at your third and fourth
examples above, the expression context is buried in the middle.  And
you haven't removed a single character of line noise, either -- indeed,
you've added two more characters.

Perl is complicated enough.  Let's not make it more so in the name
of simplicity.

                     - Damien

Reply via email to