bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
116 stars 48 forks source link

Make this.extend as close as possible to Object.assign #199

Closed qfox closed 7 years ago

qfox commented 8 years ago

It's a breaking thing, but annoying.

Yeti-or commented 8 years ago

how about polyfill?

miripiruni commented 8 years ago

@zxqfox why bem-xjst should have this ternary inspection?

If you can use Object.assign in templates it’s good. But why we need a polyfill in this.extend?

qfox commented 8 years ago

You suggest to drop this.extend?

miripiruni commented 8 years ago

Yep. Someday.

miripiruni commented 8 years ago

@zxqfox I can close issue in the hope that someday we will declare this.extend deprecated?

voischev commented 8 years ago

Ох... Вот это будет больно.

qfox commented 8 years ago

@miripiruni I don't see why we can't improve this.extend for now. Regardless of the deprecation. ;-)

miripiruni commented 8 years ago

@zxqfox what benefits?

qfox commented 8 years ago

Expectations: https://lodash.com/docs#assignIn http://api.jquery.com/jQuery.extend/ Reality: Well, you know.

miripiruni commented 8 years ago

So can I close?

narqo commented 8 years ago

:+1: for deprecation of this.extend().

Expectations: https://lodash.com/docs#assignIn http://api.jquery.com/jQuery.extend/

Object.assign() and $.extend() work different (at least for keys \w undefined values), so the point about expectations is quite doubtful, IMHO.

qfox commented 8 years ago

@narqo Yes, but the current behaviour is quitely different from both of them. It's even worse.

miripiruni commented 7 years ago
  1. Someday we mark this.extend as deprecated.
  2. You can start using Object.assign today.