Taken literally, isEmpty always returns false in ES4 (objects always have some properties, notably the intrinsic instance methods).
Presumably the definition can be amended to say that it returns true if there are no dynamic public properties on the object (ignoring the prototype). --lars > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Brendan Eich > Sent: 17. april 2008 13:47 > To: Keryx Web > Cc: [email protected] > Subject: Re: Crockfords isEmpty > > On Apr 17, 2008, at 1:23 PM, Keryx Web wrote: > > > Especially I wanted to see if isEmpty (and function.name) had been > > discussed (two features I would use a lot that I now have > to program > > around). The wiki is kind of silent on discussion. > > That's because no one has proposed isEmpty for ES4. The only > hit from this site-specific search: > > http://www.google.com/search?hl=en&q=site%3Aecmascript.org+isEmpty > > is this: > > http://wiki.ecmascript.org/doku.php? > id=es3.1:targeted_additions_to_array_string_object_date > > The function object name property has come up: > > http://www.google.com/search?hl=en&hs=F6X&q=site%3Aecmascript.org+% > 22name+property%22 > > See in particular the first hit: > > http://bugs.ecmascript.org/ticket/303 > > > The suggestions are > > not even discussed in the context of ES 4. Are there any > meeting notes > > somewhere? Or IRC logs? > > http://wiki.ecmascript.org/doku.php? > id=es3.1:targeted_additions_to_array_string_object_date > > was created on 2007/04/15 with isEmpty as part of the proposal. Since > ES4 is supposed to be a superset of ES3.1 > > I'm surprised this hasn't been proposed to the ES4 working group. > Probably we're supposed to keep track of 3.1 proposals, and I (among > others) have failed to do so. On the other hand, everyone has > had trouble keeping up with what's current in the wiki. So we > probably need both the 3.1 and 4 groups helping each other > keep up, and I'm talking to 3.1 folks about this right now. > > So, the hope is that isEmpty will make it into new editions > of the standard. I'm in favor, FWIW. > > /be > _______________________________________________ > Es4-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es4-discuss > _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
