emberjs/ember.js — pull request #9527 by cibernox (2014-11-10 00:31:07+00:00)
Title: RFC: Improved CP Syntax

This PR implements https://github.com/emberjs/rfcs/pull/11

It is based on #9489, which will be merge soon. Also supersedes #9478 (I'll close it in a minute).

There is no feature flags for this because it mostly a refactor that does not change current semantics. It could be done though.

### Taks

Done in #9489

- [x] Raise deprecation warnings when passing `cacheable` or `readOnly` to the constructor. No extrictly necessary, but is not used anywhere in the code since 2012 and simplifies things.
- [x] Deprecate usage of `cacheable()` and `readOnly()`. Are the default.

Done in this PR:

- [x] Refactor CPs to work internally with setter and getters. Passing a function still works: If the function has arity < 2 its considered a getter. If arity is >=2 is considered both setter and getter.
- [x] Although passing functions with arity >= 2 is still allowed, is deprecated. Recommend user {get, set} instead.

Steps pending for futures PRs:

- [ ] Implement logic in https://github.com/emberjs/rfcs/pull/12
- [ ] Deprecate all the things!
- [ ] Ember 2.0. Delete all the things!