On 24 Apr 2001, Russ Allbery wrote:
> David M Lloyd <[EMAIL PROTECTED]> writes:
>
> > What's wrong with using both? You could use -> if you're working with a
> > reference to an object, and you could use . if you're working with the
> > object itself.
>
> It seems relatively unlikely in the course of normal Perl that you're
> going to end up with very many references to objects.
Well, right now in Perl, an object *is* a reference. In Perl 6, will that
always be the case? When talking about something like this:
@myarray.method;
Maybe you want to pass around a reference to @myarray because it contains
a billion elements, or is tied to a file, or something; in that case
(borrowing from p5) you'd have something C-ish like this:
@{$myarrayref}.method;
But doing this:
$myarrayref->method;
is a bit clearer. I don't know; I guess we don't know for sure how any of
this will fall out, but it makes some sense to me to do it this way.
Maybe I'll be quiet now. :-)
- D
<[EMAIL PROTECTED]>