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

Which one should I use? #2

Closed
tomek-he-him opened this issue Jul 25, 2015 · 11 comments
Closed

Which one should I use? #2

tomek-he-him opened this issue Jul 25, 2015 · 11 comments

Comments

@tomek-he-him
Copy link

Hi @stoeffel, I need to curry a function.

So I’ve found this curry thing which looks like the community’s choice since long ago.

But I see there’s this one – newer than curry. And there’s chickencurry – even newer, as far as I can tell.

Are there any differences? Which one do you maintain? How about writing that down in the readme?

@stoeffel
Copy link
Contributor

Would be cool if you would use chickencurry. Feedback and contrib is more
than welcome. And if you like I will add you as a maintainer:-)
On Jul 25, 2015 6:33 PM, "Tomek Wiszniewski" [email protected]
wrote:

Hi @stoeffel https://github.com/stoeffel, I need to curry a function.

So I’ve found this curry https://www.npmjs.com/package/curry thing
which looks like the community’s choice since long ago.

But I see there’s this one – newer than curry. And there’s chickencurry
https://www.npmjs.com/package/chickencurry
– even newer, as far as I
can tell.

Are there any differences? Which one do you maintain? How about writing
that down in the readme?


Reply to this email directly or view it on GitHub
#2.

@tomek-he-him
Copy link
Author

Thanks :)

The thing is, I really think it’s best when there’s one well-regarded module for one task. That makes for a healthy, living ecosystem. That’s what we want.

https://en.wikipedia.org/wiki/Not_invented_here – that’s what we don’t want.

I recently had a conversation which made me change my mind in a couple of matters. And this statement holds the essence: mattdesl/module-best-practices#2 (comment).

I just wanted to ask: what led you to creating another module? If it’s a new better way of doing things, I’d love to use that – and contribute if necessary.

@hemanth
Copy link
Member

hemanth commented Jul 25, 2015

Related but the major problem is about avoiding duplication, there are many modules which are solving the same problem, but only few solve them very well.

@stoeffel
Copy link
Contributor

I often see my self creating a module not because I think I will solve it better or in a new way, but I think it's fun and a good training to solve problems. That's the reason I often don't care if there is already a module. My main goal with chickencurry was to try to implement ramda-like currying (with placeholders).

@tomek-he-him
Copy link
Author

only few solve them very well

Exactly! Here’s an idea I came up with – perhaps the way to go for things like lodash or our 1-liners:

Perhaps something similar to what @serapath suggests isn’t a bad idea after all. Not on developer basis (I’d still prefer to install [email protected] than @serapath/[email protected]/once) but on toolbelt basis. For example trine might just be a collection of external modules which follow the “data as this” convention. Ramda would be a set of modules “auto-curried, data as the last parameter”.
mattdesl/module-best-practices#2 (comment)

And here’s an issue I created today, hoping to start a discussion: mattdesl/module-best-practices#7. Funnily enough @hemanth – it’s exactly the same thing you mentioned that’s on my mind lately.

@tomek-he-him
Copy link
Author

My main goal with chickencurry was to try to implement ramda-like currying (with placeholders).

Good stuff! Intuitive and helps avoid crazy complicated APIs.

And the function bind syntax looks good.

These two things may be the perfect selling point! Maybe instead of curry3, curry5 and curryN just the placeholder syntax would do? add::curryN(3, 8) → add::curry(8, _, _)?

@stoeffel
Copy link
Contributor

Maybe instead of curry3, curry5 andcurryN just the placeholder syntax
would do?add::curryN(3, 8) → add::curry(8, _, _)?

👍 totally let's do this.
On Jul 25, 2015 9:33 PM, "Tomek Wiszniewski" [email protected]
wrote:

My main goal with chickencurry was to try to implement ramda-like currying
(with placeholders).

Good stuff! Intuitive and helps avoid crazy
https://github.com/dominictarr/curry/tree/3f1ca1454368a6561739843ae57e08d6b62d7086#curryto
complicated
https://github.com/dominictarr/curry/tree/3f1ca1454368a6561739843ae57e08d6b62d7086#curryadapt
APIs
https://github.com/dominictarr/curry/tree/3f1ca1454368a6561739843ae57e08d6b62d7086#curryadaptto
.

And the function bind syntax looks good.

These two things may be the perfect selling point! Maybe instead of curry3,
curry5 and curryN just the placeholder syntax would do? add::curryN(3, 8)
→ add::curry(8, _, _)?


Reply to this email directly or view it on GitHub
#2 (comment).

@tomek-he-him
Copy link
Author

👍 👍

@tomek-he-him
Copy link
Author

I’m in :D I have a spare hour and a half today, I hope we’ll manage!

@stoeffel
Copy link
Contributor

@tomekwi btw you already are a maintainer:smiley:

@hemanth
Copy link
Member

hemanth commented Jul 26, 2015

👍

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

3 participants