Skip to content
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

final release #157

Open
davidchambers opened this issue Apr 7, 2017 · 18 comments
Open

final release #157

davidchambers opened this issue Apr 7, 2017 · 18 comments

Comments

@davidchambers
Copy link
Member

The Ramda team has decided that this library is no longer serving the JavaScript FP community well. It has not kept up with changes to the Fantasy Land spec, and many of the data types lack useful features available in other libraries.

The consensus among the Fantasy Land team is that the proliferation of implementations of the same handful of algebraic data types is a trend which should be reversed. The more implementations of an ADT exist, the more unlawful implementations are likely to exist. Furthermore, it's impractical to mix and match implementations, resulting in functions such as this:

//    sanctuaryEitherToRamdaFantasyEither :: SEither a b -> RFEither a b
const sanctuaryEitherToRamdaFantasyEither = S.either(Either.Left, Either.Right);

There are, though, a number of people using ramda-fantasy. We wish to wind down this project without affecting these users, so of course the npm releases will remain available indefinitely. Furthermore, @scott-christopher has suggested merging some of the open pull requests and making one final release. I think this is an excellent idea.

In fact, I suggest going one step further. What do people think of this approach?

  1. Merge open pull requests which do not contain breaking changes.
  2. Release v0.8.0.
  3. Update [email protected] compatibility #131 to provide compatibility with Fantasy Land v3.2.x.
  4. Merge [email protected] compatibility #131.
  5. Release v1.0.0.
  6. Update the readme to state that this project is no longer under development and to provide links to replacement libraries.

/cc @SimonRichardson

@SimonRichardson
Copy link

Go go go 👌

@CrossEye
Copy link
Member

CrossEye commented Apr 7, 2017

🌿

@kwijibo
Copy link

kwijibo commented Apr 7, 2017

I'd just like to say thanks to the contributors for having done this in the first place - I found the ramda-fantasy implementations, and especially the documentation, a great help in understanding some of the different ADTs. (I also miss its presence from the Ramda REPL!)

@tusharmath
Copy link

@davidchambers Could you share links of possible libraries one should use for new projects?

@davidchambers
Copy link
Member Author

Here are the proposed alternatives:

† Currently only available as part of Sanctuary.

grossbart added a commit to stoeffel/awesome-fp-js that referenced this issue Apr 11, 2017
The library has been deprecated by its author in favour of the other ADT options available. ramda/ramda-fantasy#157
@scott-christopher
Copy link
Member

All PRs other than #131 have been merged. I'll go ahead and release 0.8 shortly.

@scott-christopher
Copy link
Member

scott-christopher commented Apr 16, 2017

0.8.0 has been released. #131 can now be updated.

@buzzdecafe
Copy link
Member

Thanks @scott-christopher !

@ds82
Copy link

ds82 commented Jul 24, 2017

Until sanctuary-maybe and sanctuary-either are available, what should I use for new projects? I prefer ramda over sanctuary .. I would rather not install sanctuary just to have Maybe & Either ..

Any thoughts on that?

@buzzdecafe
Copy link
Member

you can keep using RF, but it will not be getting further upgrades (unless someone else takes it up); or you can try folktale as well:

@jgranduel
Copy link

Just to mention folktale-2.0.0 (http://folktale.origamitower.com/) released on 2017-07-11 has breaking changes in its API:

Both are "stable" in their stability index.

@niksosf
Copy link

niksosf commented Aug 4, 2017

HI guys, just wanted to mention this library that seems to do a whole lot of fp stuff but barely anyone notices: urbandrone/futils it even has transducers and trampolining. let me know what you think.

@buzzdecafe
Copy link
Member

@niksosf thanks for the heads up, i'll keep an eye on it

@danielo515
Copy link

Seems there is no a consistent library to use for FP.
The recommended replacements require the installation of an entire library to just use a couple of types. Seems that we should cherry-pick the best implementation of each library, which seems like a total waste of time and resources to my eye.
I think it would be better to take one approach or the other: provide a single library with all the required stuff or to split every function and type into a separate library.
To be honest, I'm a bit confused about which toolset of FP libraries to choose.

Regards

@CrossEye
Copy link
Member

CrossEye commented May 23, 2018

@danielo515: Please note several things

  • The libraries that exist are there to serve certain purposes. Ramda is all about working with existing types. Its functions support some subset of lists (arrays, really), objects, functions, numbers, and strings. It delegates many of its functions to your type, especially those that match FantasyLand specs. But Ramda isn't in the business of supplying types of its own. Sanctuary is similar, except that its API requires Maybe and Either outputs, so it supplies them. Libraries like Folktale, on the other hand, are mostly about creating types for you, and they don't supply the wide variety of functions on existing types offered by Ramda and Sanctuary. See also a StackOverflow answer that goes into more depth on this.

  • I don't know about all the libraries suggested above. I tend to use Folktale for my needs, as it has a large collection of useful types, all well designed and well implemented. With Folktale you can choose the types you like. Why would you feel the need to include the Reader Monad when all you want is Task and Maybe? I usually only use a handful of its types in any one project.

  • I think it would be better to take one approach or the other: provide a single library with all the required stuff or to split every function and type into a separate library.

    FP is huge. It encompasses a handful of key ideas, and a huge number of implementations of them. There is no way to gather them all together. If you want to see something of the scale, start scanning the Haskell docs. There is simply no way to get all that ported into a single JS library. As to the individual functions, you can use Ramda that way, and Folktale too, and probably others. If that's what you choose, it's available.

  • I'm a bit confused about which toolset of FP libraries to choose.

    Of course it depends upon what you want to do. But my suggestion would be to start with Ramda; if it doesn't seem strict enough to you, try Sanctuary instead. And if you need a Maybe or a Future, look at Folktale or the built-in FantasyLand ones. But only add individual types as you need them. There is no Monoid or Functor type, only concrete types which implement those specifications. But there is an unlimited number of them possible. So find the ones you need and include them.

@danielo515
Copy link

Thanks for your suggestions. I think that as long as the types implements the fantasyland specification and the functions can understand them I'll be fine. However libraries like folktale seems to be on it's own way. Am I right?
You are also mentioning to only import certain types, do you mean tree shaking ?

@CrossEye
Copy link
Member

You can require or import Ramda functions individually:

const map = require('ramda/src/map')

Or you could probably use some tree-shaking code against the whole Ramda export.

For Folktale, as far as I know, they still support the FantasyLand specifications..

@davidchambers
Copy link
Member Author

Over the past few days I have published these packages:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests