Should String.prototype.split accept variable arguments optionally?

Brendan Eich brendan at mozilla.com
Wed Oct 16 11:21:36 PDT 2013


It's hard to add extra optional arguments to a long-standing built-in. 
People write code that passes an extra arg that has been ignored till 
the change; browsers that try shipping the new version then break that 
content, user blames browser (rightly so) but also the page, sometimes 
(not right).

Regexps suck away oxygen too, as others note. My suggestion is to focus 
fire for greater effect. If we need a new variable-split, we want a new API.

/be


More information about the es-discuss mailing list