[whatwg] WebIDL vs HTML5 storage changes
Kristof Zelechovski
giecrilj at stegny.2a.pl
Tue May 20 11:35:48 PDT 2008
"delete" means "from memory", not "from container" in C++.
In particular, "delete member of object" leaves the object in an
inconsistent state, unless the member is already NULL, and therefore such a
construct should never be used. The analogy is very inappropriate.
Chris
-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Brady Eidson
Sent: Tuesday, May 20, 2008 1:53 AM
To: Geoffrey Garen
Cc: Maciej Stachowiak; WHATWG Mailing List
Subject: Re: [whatwg] WebIDL vs HTML5 storage changes
> To give you an analogy, even in C++, where you're allowed to
> overload operator delete, if you overloaded operator delete to mean
> "do not free this object's memory, but do delete the file it
> references from the file system", well, let's just say that your
> patch would not pass code review with any of your four reviewers :).
But if you overloaded the delete operator to free the object's memory
*and* delete its referenced files from the file system, you'd be using
the operator overloading in its intended capacity.
More information about the whatwg
mailing list