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
- Re: RFC 109 (v1) Less line noise - let'... Jon Ericson
- Re: RFC 109 (v1) Less line noise - let's get rid of @% Russ Allbery
- Re: RFC 109 (v1) Less line noise - let's get rid of... Peter Scott
- Re: RFC 109 (v1) Less line noise - let's get rid of... Steve Fink
- Re: RFC 109 (v1) Less line noise - let's get ri... Russ Allbery
- Re: RFC 109 (v1) Less line noise - let's ge... Ted Ashton
- Re: RFC 109 (v1) Less line noise - let'... Dan Sugalski
- Re: RFC 109 (v1) Less line noise - let'... Steve Fink
- Re: RFC 109 (v1) Less line noise -... Ted Ashton
- Re: RFC 109 (v1) Less line noi... Steve Fink
- Re: RFC 109 (v1) Less line noi... Damien Neil
- Re: RFC 109 (v1) Less line noi... Steve Fink
- Re: RFC 109 (v1) Less line noi... Ted Ashton
- Re: RFC 109 (v1) Less line noi... Steve Fink
- Re: RFC 109 (v1) Less line noi... Casey R. Tweten
- Re: RFC 109 (v1) Less line noi... Casey R. Tweten
- Re: RFC 109 (v1) Less line noi... Nathan Torkington
- Re: RFC 109 (v1) Less line noi... Steve Fink
- Re: RFC 109 (v1) Less line noi... Nathan Torkington
- Re: RFC 109 (v1) Less line noi... Steve Fink
- Re: RFC 109 (v1) Less line noise - let's get ri... John Porter
