W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2008

[whatwg] WebIDL vs HTML5 storage changes

From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Date: Tue, 20 May 2008 20:35:48 +0200
Message-ID: <B5A9D034388C4548AF8DB1E01722231A@POCZTOWIEC>
"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@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.
Received on Tuesday, 20 May 2008 11:35:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:02 UTC