On Jun 14, 2012, at 3:10 PM, T.J. Crowder wrote:

> Making a point of making this a separate thread from the current ?? and ??= 
> thread(s), which are thankfully looking close to consensus. So that's infix 
> and assignment.
> 
> Question: Should we consider unary as well?
> 
> I ask because I went searching through my code (and others') to see where I'd 
> get a lot of use out of ?? and ??=, and I will, but I also found a **lot** of:
> 
> // 1
> if (typeof foo === "undefined") { // Or foo === undefined
>     // ...
> }

This is a different issue, but I wonder how badly the web would break if we 
made undefined a reserved word.  Does anybody in JS really declare a different 
local binding for undefined?  In ES5 we got away with making undefined 
read-only.  Maybe we should continue pushing and see if we can eliminate the 
rebindable undefined hazard. 

Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to