Re: Constructible Exceptions

On 3/25/12 12:03 PM, Marcos Caceres wrote:
> Right. Without getting too academic here, that kinda sucks as an "interface" is not really an "interface" (in the classical black-box sense)

The only way to make it so is to make it so all operations on interface 
objects are possible to perform solely using information presented in 
the interface.

In other words, no hidden state.

Making that work in a world in which there's supposed to be security 
sandboxing may be exciting in some cases.  It may be possible with 
careful design of the interfaces and the functionality exposed via said 
interfaces and careful limitation of what the platform can actually 
do...  maybe.

-Boris

P.S.  It would also be incredibly slow; to take the simple Node example, 
a browser would not be able to assume that the DOM is a tree, or indeed 
anything else about it (e.g. getting the parentNode of a node might 
completely rearrange the DOM), which would significantly complicate 
every single algorithm that has to deal with the DOM because it would 
have to be made robust against that sort of thing.

Received on Sunday, 25 March 2012 16:48:39 UTC