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

Core provides List.unzip but not List.zip #738

Closed
ceph3us opened this Issue Oct 26, 2016 · 6 comments

Comments

Projects
None yet
6 participants
@ceph3us

ceph3us commented Oct 26, 2016

I came to Elm after playing with a few functional languages before briefly and was surprised to find that List.unzip exists, but not List.zip. I know that it's trivial to derive zip from List.map2, but it seems strange to provide one but not the other.

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Oct 26, 2016

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Oct 26, 2016

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Oct 26, 2016

Contributor

This has been discussed on the mailing list in the past. The current situation is deliberate. So this is not reporting a bug or surprising deficiency of the library. Feature requests are usually not discussed here on GitHub, but instead on the mailing list. Moreover, there is the http://package.elm-lang.org/packages/elm-community/list-extra package that does contain List.Extra.zip. The guidelines for this repository here explicitly say that new functions should be proposed for such extra packages instead of being proposed straight for inclusion into core: https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions

Given all the above, I'm closing the issue here.

Contributor

jvoigtlaender commented Oct 26, 2016

This has been discussed on the mailing list in the past. The current situation is deliberate. So this is not reporting a bug or surprising deficiency of the library. Feature requests are usually not discussed here on GitHub, but instead on the mailing list. Moreover, there is the http://package.elm-lang.org/packages/elm-community/list-extra package that does contain List.Extra.zip. The guidelines for this repository here explicitly say that new functions should be proposed for such extra packages instead of being proposed straight for inclusion into core: https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions

Given all the above, I'm closing the issue here.

@Taeradan

This comment has been minimized.

Show comment
Hide comment
@Taeradan

Taeradan Feb 15, 2017

Maybe an explanation or a link to the explanation would be helpful. I don't understand why a standard function in other functional languages such as "zip" should not be in the core library. Just saying that it is deliberate doesn't seem sufficient and makes me think it is a arbitrary decision.

Taeradan commented Feb 15, 2017

Maybe an explanation or a link to the explanation would be helpful. I don't understand why a standard function in other functional languages such as "zip" should not be in the core library. Just saying that it is deliberate doesn't seem sufficient and makes me think it is a arbitrary decision.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Feb 16, 2017

Contributor

Ask on the mailing list, or search the archive of the mailing list for previous discussion on this.

Everything else said in my previous comment above stands as well.

Contributor

jvoigtlaender commented Feb 16, 2017

Ask on the mailing list, or search the archive of the mailing list for previous discussion on this.

Everything else said in my previous comment above stands as well.

@danpalmer

This comment has been minimized.

Show comment
Hide comment
@danpalmer

danpalmer Jul 16, 2017

For those finding this in the future and wondering what the discussion was on the mailing list, the only discussion I could find (on elm-discuss or elm-dev) is this one where several people raise the confusion that the author here raises. If anyone can find any other discussions please do link to them here for the benefit of others. There appears to be no conclusion on the discussion either way.

I understand the contribution guidelines mean this is not the right forum for proposing this change, but it looks like there's some support for it, so it might be worth a proposal on the mailing list.

danpalmer commented Jul 16, 2017

For those finding this in the future and wondering what the discussion was on the mailing list, the only discussion I could find (on elm-discuss or elm-dev) is this one where several people raise the confusion that the author here raises. If anyone can find any other discussions please do link to them here for the benefit of others. There appears to be no conclusion on the discussion either way.

I understand the contribution guidelines mean this is not the right forum for proposing this change, but it looks like there's some support for it, so it might be worth a proposal on the mailing list.

@la-yumba

This comment has been minimized.

Show comment
Hide comment
@la-yumba

la-yumba Aug 7, 2017

for what it's worth, I too think that zip should be provided in the core lib, as it's more intuitive than map2 (,)

I thought that Elm aimed at being intuitive and lowering the barrier to entry - this choice seems to go against this philosophy

la-yumba commented Aug 7, 2017

for what it's worth, I too think that zip should be provided in the core lib, as it's more intuitive than map2 (,)

I thought that Elm aimed at being intuitive and lowering the barrier to entry - this choice seems to go against this philosophy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment