Re: WG clarification request for SVG_WRONG_TYPE_ERR

On Fri, 6 Aug 2004, Robin Berjon wrote:
> > 
> > Theoretically, if you have an object implemented in Perl (e.g.), you can
> > define it in such a way that any method call results in a lookup, [...]
> 
> This is veering off-topic fast, but there are some inacuracies here.
> 
> You can indeed control method lookup in Perl, provided that a method 
> isn't defined, using AUTOLOAD. But that isn't Perl-specific in any way, 
> and in fact supporting a default message handler is a feature of all 
> self-respecting OO languages (Smalltalk, ObjC...).

Of course. Hence the "e.g." parenthetical.


> An object in pure Perl *is* typically explicitly labelled as being "an 
> SVGMatrix", in fact, the definition of a Perl object is just that: a 
> reference to a variable that happens to know which class it belongs to.

The name of the class that defines an object doesn't have to have anything 
to do with the interfaces that it implements. My point was that typically 
in pure Perl you don't explicitly state (in code) which interfaces a class 
implements, and that the exact list of which interfaces it implements 
could well vary during the object's lifetime.

The question is what should a UA do when interacting with an object that 
initially appears to implement an interface, but then stops doing so while 
it is being used.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 6 August 2004 10:21:43 UTC