destructuring: as patterns?
allen at wirfs-brock.com
Mon Apr 23 10:00:49 PDT 2012
On Apr 23, 2012, at 2:40 AM, Andreas Rossberg wrote:
> On 21 April 2012 11:56, Herby Vojčík <herby at mailbox.sk> wrote:
>> JS model _is_ about "sloppy semantics" (I do not call it sloopy, I'd rather
>> called it liberal), that is, undefined if not present.
> It's a term sometimes used on TC39, I didn't invent it (I used to call
> it "classic" mode for improved neutrality).
> I may take issues with associating pre-strict-mode sweeping under the
> rug with liberal ideals, though. :)
I like Martin Rinard's concept of code that is "failure oblivious" http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.68.9926&rep=rep1&type=pdf
To me, undefined propagation feels a lot like NaN propagation in numeric expressions. Those of us who don't do a lot of numeric computation may be puzzled by NaNs, but it is a lot easier to simply let a NaN propagate through a complex formula and check it at the end, then it is to check for an exception on each operation of the formula. And, sometimes it turns out that the NaN didn't really matter at all...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss