-
Notifications
You must be signed in to change notification settings - Fork 11
Option versus Maybe #8
Comments
I think it would be better to chose one name instead of |
@fantasyland/core what do others think? |
I don't care about the name, change it! |
We do have to consider that others have already written code with the current naming structure. Names don't really matter to me. But I would hate for code to unexpectedly break. Perhaps a "deprecation" warning for a given period of time? |
Versioning should solve this for us? Older versions should be on npm (etc) or you can still reference a commit, or just deprecate the repo and start another. As long as we don't have too:
|
Whats the best way to move "Maybe" forward? I'd love to help. |
Make a PR, should be quite simple tbh |
@SimonRichardson oh ok. regardless i'm happy to open a PR :) |
Added PR: #9 |
Would it not be prudent to create a new repo with a more fitting name (i.e. Alternatively, this repo could be renamed, but that would mean that contributors would have to update their local repos. |
Sorry to seem dense, but I've no clue what's being proposed here. Is there a less than three sentence summary? |
@joneshf
hence the rename of |
Excellent! Thanks so much. |
I think GitHub automatically redirects requests so this wouldn't be necessary. :) |
@SimonRichardson any update on creating a new repository (or renaming)? We could get a baseline going by simply using the renamed code from #9? |
We should just rename this repo, i'll do it now. |
It's done! |
Any updates on this? It's been over a year. I agree with @roobie ... It would be cool to see #9 merged and then see whether or not @davidchambers 's Maybe implementation in Sanctuary would fit here. |
sanctuary-maybe has been released. 🎉 |
I'm excited by the discussion in ramda/ramda-fantasy#139.
One potential problem has become apparent to me: there are two common names for this data type. Haskell uses "Maybe"; Scala uses "Option". Neither is better or worse than the other, but there are contexts in which one is more appropriate than the other. Sanctuary, for example, is strongly inspired by Haskell and PureScript so uses "Maybe", whereas Folktale draws inspiration from Scalaz and Cats (I believe), so uses "Option".
Since the goal is for this project is to be the canonical implementation of the Maybe/Option type, it would be nice if we could somehow please everyone. While someone could easily include…
in her own code to use the "Haskell" data constructors, the string representation of
Just(42)
would still be'Some(42)'
.I'm thinking through the ramifications of merging Sanctuary's Maybe type into this repository. Since Sanctuary is inspired by Haskell and PureScript I certainly want to keep using "Maybe" in that project, and I certainly don't want to monkey patch
Option#toString
.Perhaps this project should export both Maybe and Option:
Maybe and Option would really be two names for the same type.
Just(42)
andSome(42)
would be interchangeable, though they would have different string representations.I realize the thoughts I'm sharing are not fully formed. My goal is to start a discussion rather than to propose a specific solution.
The text was updated successfully, but these errors were encountered: