On Thu, Oct 30, 2008 at 12:46 PM, Moritz Lenz
<[EMAIL PROTECTED]> wrote:
> The correct way to define user-defined stringfication is either through
>
> method Str { ... }
>
> or
>
> method prefix:<~> ($self: ) { ... }
>
> (afaict both are not implemented in Rakudo yet)

Yeah, I can't even declare a method that way (prefix:<~>), regardless
of whether or not Rakudo tries to call it to stringify.  The $self:
isn't needed in this case, though, right?  The body of the method just
uses $.x and $.y without going through a ref to the object.

As a point of comparison, Pugs accepts the operator overload
definition but doesn't honor it;  ~$point still returns the generic
"<obj:Point>".

-- 
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to