tc39 / proposal-flatMap

proposal for flatten and flatMap on arrays
https://tc39.github.io/proposal-flatMap
214 stars 19 forks source link

Would something like 'use stricter' satisfy the smoosh/flatten issue? #58

Closed ianwremmel closed 6 years ago

ianwremmel commented 6 years ago

Not sure if this is the right way to post this, but #56 has been locked.

I'm presenting 'use stricter' in jest, but doesn't 'use strict' have pretty much the right behavior to solve the naming collision problem? Would a reasonable set of pragmas (perhaps 'use es2018', 'use es2019', etc) allow functions or modules to opt into new behaviors without "breaking the web"?

ljharb commented 6 years ago

That can apply to syntax, but not to api - so even if it was a good idea to restrict features to strict mode (it’s not), it wouldn’t affect this proposal.