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

Reply via email to