Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
define::set doc issues #1047
The above fiddle works for merged properties, but it is pretty different than the docs.
I think we need to improve this behavior. It is a valid thing to define a default value, then construct a map with said defaults, then set a value, and need to merge. If I had bound to the info property, for instance, i would always want to merge the value instead of replacing it, as otherwise my handlers will all have to be re-bound.
@shcarrico How would you improve the behavior?
One should typically write
To avoid replacing
Also, when you say:
It's nice to be able to have a setter syntax merge. But similar to JS, it might be confusing if someone did:
alice.info = data
and that extended instead of set.
I think maybe the problem is that: