<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><html>On May 20, 2008, at 2:56 PM, Robert O'Callahan wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite">On Tue, May 20, 2008 at 3:50 PM, Maciej Stachowiak <<a href="mailto:mjs@apple.com">mjs@apple.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d"><br> On May 19, 2008, at 4:54 PM, Robert O'Callahan wrote:<br> <br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> If "storage.keyName = 'value';" can create a new storage item (persistently), won't authors expect "delete storage.keyName;" to remove it (persistently), as a matter of consistency?<br> <br> If overloading "delete" is too quirky or too hard to implement, then it seems none of the other shorthands should be allowed either.<br> </blockquote> <br></div> Many objects in the DOM implement custom name getters (for instance NodeList) and a few even implement custom name setters (CSSStyleDeclaration, at least the way it is done in WebKit) but no one has clamored for a custom deleter or expected delete to work "as a matter of consistency" or been confused that "style.opacity = 0" is allowed but "delete style.opacity" is not. So I would say the available evidence argues against your conclusions.<br> </blockquote><div> <br>I think 'style' does not bear on my conclusions, since 'style' has custom property getters and setters, but not *adders* --- "style.foobar = ...;" does not trigger any DOM API. Storage is different, it is something new.<br> </div></div></blockquote></div><br><div>style.opacity = ... certainly triggers DOM API even if opacity was not previously set on that style. And there is even a plausible mapping for delete (style.removeProperty). It's not completely open-ended but you can certainly have properties added to and removed from a style declaration.</div><div><br></div><div>Ultimately the conclusion I question is that having obj.foo and obj.foo = ... work, but not delete obj.foo, will create confusion or is somehow illogical. I don't believe it will create confusion, and I think style is a relevant example of a case where it has not.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></div></body></html>