Tom Christiansen wrote:
>
> Perl already does the sanity check for you: "can't call method
> without package or reference". What you're saying requires the
> programmer to diddle about, which is never a win.
I'll concede that point, with the counter that it lets you get exactly
what you want. C
On 24 Aug 2000 15:53:42 -, Perl6 RFC Librarian wrote:
>Everyone on this list should be familiar with the problem. You can't
>tell scalars and references apart by looking at them. They are
>completely ambiguous. Consider:
>
> $stuff{key} # hash value
> $stuff[0]# array value
Tom Christiansen wrote:
>
> I happen to strongly appreciate that the invocant in
>
> $a->blah
>
> can be of either sort; that is:
>
> $a = "MyClass";
> $a->blah;
>
> or
>
> $a = MyClass->generate();
> $a->blah();
>
> In fact, who knows what generate() returned? It could
>However, consider this in a different light for a moment:
> $a = "MyClass";
> *a = MyClass->generate; # ask for ref back
> $a->blah;
> *a->blah; # use our ref
>Whether or not having to care about your refs is good or bad depends on
>which way you look at it. In one cas
Tom Christiansen wrote:
>
> You pretend that a reference is not a "true" scalar.
> That's certainly not valid. It obviously is.
Well, this is a matter of semantics, pure and simple. Technically, it
is. But I would argue that cognitively it is not by any means.
Especially if a reference points t
>Split Scalars and Objects/References into Two Types
I do not see how taking something simple and elegant
and making it complicated does anybody any good.
And yes, I did read all of it.
You pretend that a reference is not a "true" scalar.
That's certainly not valid. It obviously is.
You als
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Split Scalars and Objects/References into Two Types
=head1 VERSION
Maintainer: Nathan Wiger <[EMAIL PROTECTED]>
Date: 23 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 147
Sta