-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add mergeFlipped
#84
Comments
I think I'm fine with |
I think there is a need for an operator to make working with records easier and it has come up in the discord before. E.g. @i-am-the-slime and @mikesol also proposed operators for frequently used record operations (though they were taking about { x: 1, y: 2 } ... { y: "y" } ... { z: true }) but tbh I think if I wouldn't know it I think |
I don't think there's any point to having The non operator left-to-right alternative is: { firstName: "John", professional: true }
# merge { professional: "Software Engineer", age: 58 }
# merge { firstName: Just "Mike" } I'm personally ambivalent towards this. I don't think the operator is more clear than |
Good point.
Just wanted to say that I really like this style of syntax. |
I would argue that |
Add
mergeFlipped
and an infix operator//
As a user I'm typically more thinking in terms of
mergeFlipped
thanmerge
, as I want to overwrite a record with some new fields. E.g. in Typescript I can doand in dhall
//
is avaiable as amergeFlipped
operator:So in Purescript I would also like to do the following and I think it makes for a nice addition to
purescript-record
:I have created a PR to illustrate this #83
The text was updated successfully, but these errors were encountered: