At 11:36 PM 8/6/00 +0000, you wrote:
>I suggest that objects provide a default method called C<SCALAR> that
>determines what they produce in a scalar context. When stringified, an
>object would automatically call its C<SCALAR> function and return the
>correct value.
I don't see in here how an object tells the difference between being in
scalar context and being in string context.
Call me old-fashioned, but I don't see what's wrong with
use overload '""' => sub { $_[0]->to_string };
for anything that wants to take such a relatively odd action.
--
Peter Scott
Pacific Systems Design Technologies
- RFC 49 (v1) Objects should have builtin string SCALA Perl6 RFC Librarian
- Re: RFC 49 (v1) Objects should have builtin strin... Peter Scott
- Re: RFC 49 (v1) Objects should have builtin s... Spider Boardman
- Re: RFC 49 (v1) Objects should have built... Nathan Wiger
- Re: RFC 49 (v1) Objects should have b... Bart Lateur
- Re: RFC 49 (v1) Objects should h... Peter Scott
- Re: RFC 49 (v1) Objects should have built... Damian Conway
- Re: RFC 49 (v1) Objects should have b... Nathan Wiger
- Overloading && || Nick Ing-Simmons
- Re: Overloading && || Peter Scott
- Re: Overloading && |... Nick Ing-Simmons
- Re: Overloading &&am... Peter Scott
