[Bug 12845] Disallow shadowing attributes


--- Comment #23 from Allen Wirfs-Brock <allen@wirfs-brock.com> 2011-06-08 05:42:33 UTC ---
(In reply to comment #22)

> I'm not sure I can think of an example of "different but compatible" behavior
> that doesn't run into that problem.  Can you?

The conventional way this would be defined is you can replace a method with
another that does everything the original did plus some other stuff. 
Presumably anybody who is dependent upon the original behavior doesn't care
about the "other stuff".  Adding a logging wrapper is a simple example.

More generally, I don't think it is the job of these specs. to try to bullet
proof against every crazy thing somebody might do via reflection or debugging
APIs, or other "exploits".

If you take a any method and apply it do the wrong kind of object, crazy things
may happen.  If everything is implemented in JavaScipt then at least memory
safety will be guaranteed by the language. If part of the system is implemented
outside of JavaScript then it is the responsibility of the host object
implementation to maintain memory safety in those situations.  Beyond that I
don't think you can say very much that will be actionable by implementations
without straitjacketing JavaScript code in ways that may not be either
practical or desirable.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Wednesday, 8 June 2011 05:42:36 UTC