John Porter wrote: > > Michael Fowler wrote: > > > > I think a stringified reference is worth seeing, moreso than a simple undef, > > for debugging purposes if nothing else. > > I personally would like to have the stringification of refs be a > symmetric operation, i.e. such a string should dwim in a ref context: > > $r = bless {}, 'Foo'; > $s = "$r"; > ref($s); # True. > $s->bar; # call method of Foo. > > I guess that means the deref operator would have be implicitly overloaded > for strings... Bit dangerous there - the string-to-ref operator is left out for a purpose. - Would you really want the ref-counting system / the GC system to scan strings? - Would like like the effects of pointer arithmetic that the ref-tostring, edit-string, string-to-ref sequence allows? Hildo
- Re: RFC 48 (v2) Objects should have builtin stringifyi... Michael Fowler
- Re: RFC 48 (v2) Objects should have builtin strin... Jonathan Scott Duff
- Re: RFC 48 (v2) Objects should have builtin s... John Porter
- Re: RFC 48 (v2) Objects should have built... Jonathan Scott Duff
- Re: RFC 48 (v2) Objects should have b... John Porter
- Re: RFC 48 (v2) Objects should have builtin strin... Nathan Wiger
- Re: RFC 48 (v2) Objects should have builtin s... Dan Sugalski
- Re: RFC 48 (v2) Objects should have builtin s... Michael Fowler
- Re: RFC 48 (v2) Objects should have built... John Porter
- Re: RFC 48 (v2) Objects should have b... Dan Sugalski
- Re: RFC 48 (v2) Objects should have b... Hildo Biersma
- Re: RFC 48 (v2) Objects should h... John Porter
- Re: RFC 48 (v2) Objects should have b... Piers Cawley
- Re: RFC 48 (v2) Objects should have built... Nathan Wiger
- Re: RFC 48 (v2) Objects should have b... Michael Fowler