-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bikeshedding is welcome! #22
Comments
|
@ncthbrt Is |
Is |
|
So basically, |
|
I would hope |
I agree with I'm torn with the piping, I'm not sure how important the runtime support is, but Hongbo has been pretty actively telling people to use fast pipe. For example all of Belt uses the fast pipe API design and even that is written in OCaml so the decision is pretty obvious in that case which is more important according to the maintainers. |
|
Oh, and isn't |
@rizo People coming from JS might be reluctant to use |
Ok, since pretty much everyone here and in Discord wants |
@aantron I think |
Elm uses |
I'd personally prefer 🚪🏃♂️ |
A little trigger happy on the submit button Although the However, I also heavily subscribe to the "McDonald's Philosophy" of coding which states:
So even if I think |
I think the best thing for moving on |
...aaand |
@aantron I have to say that I’m against adding |
I'm thinking to rename |
I think flatMap would be better, not because it's more descriptive, but because it's consistent with other libraries in the eco system (for example Belt). Adding yet another term can be confusing, especially for newcomers, but also for those who are used to using flatMap in other libs. |
The issue I have with
Another concern I have is that when mixing options/results and promises, it might actually be beneficial to have two separate (and highly descriptive) names for chaining them, so that it's immediately clear which identifier refers to which datatype being manipulated. This might also be useful when modules are locally opened. |
The underlying abstract meaning of the operation is |
I think I'll indeed change it to |
Also,
|
I think Other options are:
|
I like |
@rizo |
+1 to |
We should consider names qualified, i.e., in the way how they will look in the code. So here are alternatives (I personally hate camelCase and in general primitives that need more than one word in their name): Promising (nothing
|
Given a qualified name I will think that |
|
If we want a more specific time based name than Thinking about the relationship between |
@lpil for me it's the |
So |
|
Oh my... 😄 If I had to vote I'd just go for Aren't people supposed to use the ppx syntax anyway for binds? |
Ok, I released Repromise 0.6.0, with these renamings for now:
Thanks for the discussion so far :) |
A few thoughts on this. First, aliases should be considered as a last resort because, although they are cheap from an implementor's POV, they are very expensive from a consumer's. At best, they require a special linting rule (if one even exists) to ensure your team uses one name over the other consistently, and at worst they cause unnecessary cognitive load when reading code that uses them interchangably. (I can't count the number of times I had to consult the docs to reassure myself that I think we ought to choose a name that is part of the monad interface, and avoid aliases altogether. I'm not sure if there is any such spec in Reason, but there exists an interface specification in JS that we could leverage: https://github.com/fantasyland/fantasy-land#monad. This spec suggests the use of Let me know what you guys think. :) |
Closing this as it seems settled for the time being, however bikeshedding is still welcome :) |
Shouldnew_
be renamedmake
to avoid the underscore?|>
or|.
for chaining?then_
? ToflatMap
?andThen
?resolve
orresolved
?all
andrace
take lists or arrays?Please do discuss any such issues. We want to make a pleasant API. We are keeping the Repromise version in 0.x.y for now to allow plenty of room for breakage :)
The text was updated successfully, but these errors were encountered: