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

Generic programming by default #35

Closed
spdegabrielle opened this issue Jul 18, 2019 · 5 comments
Closed

Generic programming by default #35

spdegabrielle opened this issue Jul 18, 2019 · 5 comments

Comments

@spdegabrielle
Copy link
Sponsor Member

Generic programming by default: map, fold, and friends are generic and not specialized to lists. - @takikawa 3 Oct 2012

@sorawee
Copy link
Contributor

sorawee commented Jul 18, 2019

Dup of #19

@jackfirth
Copy link
Sponsor Collaborator

Closing as duplicate of #19.

@rocketnia
Copy link

On the Discord, the idea of making + generic has come up a couple of times now. That would fall under this issue, but probably not #19 since not all values that support + are necessarily "collections." Should this be reopened?

@jackfirth
Copy link
Sponsor Collaborator

Maybe "operator overloading" would be a better description of that behavior?

@rocketnia
Copy link

That would be too narrow. Operator overloading is an approach to +, but I think a lot of extensions to + will really be attempts to extend the whole numeric tower, and I think extensions to the numeric tower will tend to revolve around defining where a new number type fits into the existing lattice of implicit coercions. I think the term "operator overloading" isn't broad enough to describe that kind of technique, while the term "generic programming" reflects the goal to allow different call sites to call + with different types, no matter what technique ends up being used to achieve that goal.

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

4 participants