-
-
Notifications
You must be signed in to change notification settings - Fork 870
Encourage decorator-style Ember.computed/Ember.observer #457
Conversation
``` | ||
|
||
This is possible because Ember extends the `function` prototype. This is no | ||
longer the recommended syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't sure whether or not to just completely remove this and the other one like it for .observes()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanpenner @mixonic @tomdale do any of you have any thoughts about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, I have an idea. We could take this out of here and move https://github.com/emberjs/guides/blob/master/source/configuring-ember/disabling-prototype-extensions.md into this Object Model section. We'll just need to change the wording a bit to make it flow right. Does that seem okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very much not in favor of integrating caveats about prototype extensions into the main flow.
I'd like to see us pick a happy path and talk only about that happy path in the primary documentation. Anything that deviates from the happy path can be moved to an auxiliary guide. If we make non-proto-extension syntax the default, let's update to that everywhere and create a legacy appendix describing how that syntax works for folks who need to work on code bases that use prototype extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second removing proto-extensions references from the guides, especially since we have versioning. If people think they were removed and can't use them, well we're halfway to our goal ;)
Awesome!!! Let's get some feedback on your question and then get this merged in! |
3cf58ad
to
518cb7e
Compare
Updated and removed the inline references to the old syntax in the guides for computed properties and observers. |
Encourage decorator-style Ember.computed/Ember.observer
Ember.computed
overproperty()
Ember.observer
over.observes()
fixes #455