4 ms·
Default parameter values are also part of ES6.
by mnemonik 13y ago
Default parameter values are also part of ES6.
- bsimpson 13y agoDefault parameter values, ...rest expressions, and modules were all part of ActionScript 3, which was an early implementation of JavaScript Next (then called ECMAScript 4). As I recall, Microsoft and Yahoo! threw a fit about it, and most of the interesting enhancements were shelved. Glad to see some of the good bits making their way back in. The number of times I've had to do function(firstParam, secondParam, thirdParam) { if (firstParam.hasOwnProperty('firstParam') { var argumentDict = firstParam; firstParam = argumentDict['firstParam']; secondParam = argumentDict['secondParam']; thirdParam = argumentDict['thirdParam']; } firstParam = firstParam || "default value"; ... is sickening.
- eurleif 13y agoWhy did Yahoo! care? Why did Yahoo! even have a seat at that table?
- ax 13y agoYahoo did and does have a spot at the table because they are a dues-paying member of ECMA. They have as much weight in the committee as any other member (MS, Google, Mozilla, now Facebook, etc.) Presumably Yahoo cares because they have millions of users running JS code.
- Benvie 13y agoAlso Douglas Crockford worked at Yahoo.
- ax 13y agoI don't think "threw a fit" is an accurate description. More like, objected to many aspects for technical reasons. And, considering that TC-39 agreed at the Oslo meeting to pursue ES3.1 over ES4, presumably they had a pretty good argument. Brendan Eich's mail sent after the accord[1] has some detail. 1) https://mail.mozilla.org/pipermail/es-discuss/2008-August/003400.html https://mail.mozilla.org/pipermail/es-discuss/2008-August/00... (Disclaimer: I work for MS).