Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCombinator to merge two futures yielding the same types #271
Conversation
This comment has been minimized.
This comment has been minimized.
|
Thanks for the PR! Could this be a new module, I also wonder if we should call this |
P-E-Meunier
added some commits
Dec 1, 2016
This comment has been minimized.
This comment has been minimized.
|
cc @tailhook you tend to have a lot of insights on naming these combinators and such, does this look ok? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I'd prefer to keep the dependencies slim for now if possible, but that's certainly an option to keep open (and can be done in parallel if need be) |
This comment has been minimized.
This comment has been minimized.
|
Personally I prefer the either name. I don't really think it has a hard implication of two variants. |
This comment has been minimized.
This comment has been minimized.
|
I initially called it I don't really mind, but I've tried not to use Either because it's not very readable in Haskell, where it means both I'm just realising it's not a good reason, since Rust has an actual |
This comment has been minimized.
This comment has been minimized.
|
@pijul Do you plan on updating this so it can be merged in? |
This comment has been minimized.
This comment has been minimized.
|
Update in which way? |
This comment has been minimized.
This comment has been minimized.
|
Ah yeah I'd still like to discuss naming a bit here before landing (there's quite a few possibilities). @aturon do you have thoughts on the particular names used? |
This comment has been minimized.
This comment has been minimized.
|
Well, the naming part is unclear here (this is actually why I haven't submitted a similar PR a while ago :) ). Personally, I like current version:
I.e. it reads like The |
This comment has been minimized.
This comment has been minimized.
|
My preference is for Another question is what to call the variants. I've also seen these called |
This comment has been minimized.
This comment has been minimized.
|
Ok, @pijul want to rename this to |
This comment has been minimized.
This comment has been minimized.
|
Sure! |
alexcrichton
merged commit b66309f
into
rust-lang-nursery:master
Dec 8, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks! |
ghost commentedDec 1, 2016
Supposed to solve #270.
I chose the name
Branchto be consistent with future similar types with more variants (if ever useful), likeBranch3,Branch4, etc, instead of Haskell'sEither.