-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove R.set #1181
remove R.set #1181
Conversation
👍 |
🌿 |
It sounds to me like you've forgotten how broke I'd personally much rather have the current The discussion of the "issues" regarding the current |
I have been sceptical all along of the deep merge. Not that I think it's a bad idea, but that I expect odd difficulties and strange corner cases. And I also believe there is an important place for shallow merges. We have had Based on #777 and #778, we renamed this to My reasons for wanting this function had to do with cases like this: var process = function() {
var defaults = {
prop1: 'val1'
prop2: 'val2',
//...
};
return function(param, opts) {
var options = R.mixin(defaults, opts || {});
// continue processing using options;
};
}()); So the parameter order for this doesn't feel wrong for me, the general functionality of the shallow version doesn't feel wrong. The notion of a deep merge was more interesting as a theoretical extension of So, I'm for backing off these changes in order to get 0.15 out and figure them out afterward. |
Just because a thing can be implemented in two different ways that are both reasonable doesn't make one version "odd" or "strange". I think that both the behavior of the current
In general all Ramda functions that returns a modified thing takes the thing to update as it's last argument and the form of change as its first argument. You are merging
Deep merge has been requested several times by users. It is desired. How is not releasing |
@paldepind, this pull request in no way reflects the relative merits of I suggest that we merge this pull request, publish v0.15.0, then focus our attention on |
I personally don't care the slightest about #1170. I made the change because some users did. Anyway, I do not want to hold back 0.15 and if we aim for a quick 0.16 release then this is not an issue. Feel free to go ahead 😸 |
Great. Let's aim to release v0.16.0 next weekend (or sooner). I'll merge this pull request, publish v0.15.0, and write the upgrade guide. :) |
R.set
was added in #1088;R.merge
was deprecated in #1105. This pull request reverts these two changes, for three reasons:R.set({})
in AdddeepMerge
/set
/extend
/mixin
#1088 (comment). @paldepind opened Handle empty objects and falsey values inset
#1170 to address this, but we've yet to reach consensus on the desired behaviour.R.mergeAll
when we decided to deprecateR.merge
. It's inconsistent to have the former without the latter. Determining the correct course of action will require thought.R.set
should handle{}
. Reverting these changes will allow us to release v0.15.0, then devote time to the above concerns.