Consistency in The Negative Result Values Through Expansion of null's Role

Brendan Eich brendan at mozilla.org
Wed Aug 15 16:31:26 PDT 2012


David Bruant wrote:
> Le 16/08/2012 00:35, Rick Waldron a écrit :
>> On Wed, Aug 15, 2012 at 6:02 PM, Erik Reppen <erik.reppen at gmail.com 
>> <mailto:erik.reppen at gmail.com>> wrote:
>>
>>
>>     Is consistent type return a heuristic carried over from more
>>     strictly-typed paradigms or would it murder performance of the
>>     native methods to do the logic required to return something like
>>     null in these cases? In a dynamic language, why not focus on more
>>     consistent return types across the board for an indicator that
>>     you won't be getting particularly handy results?
>>
>>
>> It would break the web.
> I agree and would like to encourage you (Erik) to read the foreword of 
> my "ECMAScript regrets" project 
> https://github.com/DavidBruant/ECMAScript-regrets#foreword
>
> The only way forward to "fix" broken parts of JavaScript (like making 
> it more consistent) is to give up on JavaScript and create a new 
> language that compiles down to JavaScript. That's my opinion at least.

There's another way: extend JS with fixed forms and hope the broken ones 
die eventually.

Both compile-to-JS and evolve-JS-to-be-better are happening, and the 
former informs the latter directly (=> and for-of from CoffeeScript are 
in ES6, e.g.). Both should, since JS is at this point a huge public 
good, like it or not.

/be

>
> David
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list