-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Currently Ember extends built-in prototypes of Array, Function, & String by default. Although Ember doesn't require these extensions and they can be disabled, because they are enabled by default they tend to stay that way as evident by sites like vine, twitch, nbcnews, & discourse using the default settings.
The problem with adding methods like Array#compact, Array#without, Array#uniq, Function#on, & String#capitalize is that it increases the likelihood that they'll be used and cause problems/roadblocks for future built-in language extensions. For example, if ES7 tried to add Array#without that behaved in a different way than Ember's Array#without newer environments would get the built-in version while older would get Ember's causing an inconsistency and increased possibility of breaking thing. We've seen this recently with MooTools and Array#contains, but it's happened before with Function#bind, String#contains, and even DOM4 Element#remove.