in reply to Perl6 headaches?
There's quite a bit that's changing with respect to array/hash refs and changing how they are accessed fits into that. It could be done withtout changing -> to . but with the other reasons, it fits. From Exegesis 2:
Now other reasons..Access through... Perl 5 Perl 6 ================= ====== ====== Scalar variable $foo $foo Array variable $foo[$n] @foo[$n] Hash variable $foo{$k} %foo{$k} Array reference $foo->[$n] $foo[$n] (or $foo.[$n] +) Hash reference $foo->{$k} $foo{$k} (or $foo.{$k} +) Code reference $foo->(@a) $foo(@a) (or $foo.(@a) +) Array slice @foo[@ns] @foo[@ns] Hash slice @foo{@ks} %foo{@ks}
1) To me dot notation will be much less cluttered than -> when you have a lot of complex data structures and OO structures that go fairly deep. Using Perl for little over a year, my biggest complaint with the language is just how ugly the code gets when you deal with complex data structures and OO. I think dot notation will help.
3) It really doesn't need to be used for derefrencing, just for OO.
2) Just about every other language that supports OO uses dot notation (could be all, but I'm covering my bases). It takes away a reason not to use Perl.
3)Perl is going to have much better OO functionality. It's not just going to be something that's hacked on top of what's already there (like now).
4) It's one less character
And you probably still don't like it. Maybe because I haven't been around that language that long, but I personally like the change. In a year or so, I'd bet it's no longer an issue.
Rich
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Perl6 headaches?
by chromatic (Archbishop) on Nov 05, 2001 at 01:08 UTC | |
by kwoff (Friar) on Nov 05, 2001 at 04:50 UTC | |
by bbfu (Curate) on Nov 05, 2001 at 08:35 UTC | |
by kwoff (Friar) on Nov 05, 2001 at 20:35 UTC | |
Re: Re: Perl6 headaches?
by jepri (Parson) on Nov 05, 2001 at 02:03 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |