selfrefactor / rambda

Faster and smaller alternative to Ramda
https://selfrefactor.github.io/rambda
MIT License
1.65k stars 89 forks source link

Suggestions #615

Closed selfrefactor closed 1 year ago

selfrefactor commented 2 years ago

This issue is opened to encourage suggestions and feedback

Previous such issue

ivan-kleshnin commented 2 years ago

Any plans to support Map and Set in the future? The downside is that it would probably require to change the flat API to namespaces. To avoid ambiguous names and crazy types – the problems we already partially have with objects vs array generics.

selfrefactor commented 2 years ago

Any plans to support Map and Set in the future?

Can you be more precise? I suppose you mean that you can use Rambda.filter for example with Set and Map?

I believe the main obstacle will be the TS definitions of the new logic. I will try to research what we can do in this regard and I'll get back to you.

ivan-kleshnin commented 2 years ago

Sorry. But you got me right, I meant that "new" ES2015 objects. In the context of Rambda API it could be supported with (even more) polymorphic R.filter or a collection of non-polymorphic Set.filter, Array.filter, Map.filter – forementioned "namespaces".

I guess one of the reason that Set and Map are rarely used is that almost no helper library supports them. Maybe there's some complexity beneath which explains that, as you noted. I don't know, t.b.h.

But I'd like to know, as I occasionally catch myself thinking about sets/maps as potentially better datastructures in certain cases.

essenmitsosse commented 2 years ago

Is there any reason why applyTo is not implemented? Seems like a pretty straightforward function, while at the same time being super useful. I'd actually like to give it a shot, unless I'm missing something fundamental here.

Same goes for count

iwinux commented 2 years ago

A meta issue: the README.md is way too large, which makes the repo main page unresponsive - any idea to move the documentation somewhere else?

selfrefactor commented 2 years ago

Thank for reporting this issue @iwinux

The README.md is used to create docsify site, that is published at https://selfrefactor.github.io/rambda

What I can do is make github README from docsify document. I will report back, when I have applied the solution.

LAC-Tech commented 2 years ago

This library is great, well ahead of the competition, but the name is not fit for purpose.

I keep forgetting if the one I like has a 'b' or not in it (yours is the one I like, it has a 'b', but I'll forget again tomorrow).

It's also really hard to talk to other devs about this in real life. "Have you heard of rambda? No not ramda, rambda. It's a functional programming library like ramda...".

selfrefactor commented 2 years ago

Thank you @LAC-Tech for the suggestion. I have to say that I like the idea as there is solid reasoning behind it.

Please suggest a name that is still available on NPM and I am willing to create the tooling to publish Rambda as the new library. Of course, this repo will still exists, only the new one will hold the source files and same documentation and will have its own issues.

selfrefactor commented 2 years ago

One suggestion is funto, because FUNctional programing is FUN-TO write

ivan-kleshnin commented 2 years ago

Hi folks! I agree that a rebranding may be a good idea. And I actually like "funto"! It only clashes with some NZ estore https://funto.co.nz/ which is not a problem. Should be pretty googlable.

selfrefactor commented 2 years ago

Lets pick more suggestions for name before deciding which one to be. I have one more - Serval, which is one of fastest mammals, because Rambda library is fast library.

LAC-Tech commented 2 years ago

Any name that's unique in the space is a big win, and would help increase visibility.

That said I go for Serval as they were one of my favourite animals in the zoo as a child :) Also if you call it Funto a lot of people will pronounce it like it's Japanese, which may or may not get on your nerves.

ivan-kleshnin commented 2 years ago

In my view Serval would make a good name for a fast server (similar words). Funto contains "fun" (functional) so it's descriptively closer.

selfrefactor commented 2 years ago

I am thinking that keeping R as a start letter makes sense as the library still supports Ramda API.

Few short words starting with R, that are free on NPM:

selfrefactor commented 2 years ago

I am now more in favor of new name, but I won't change the name of this library but I will create similar library that doesn't aim following Ramda API. Linking to the new issue to follow the progress - https://github.com/selfrefactor/rambda/issues/653