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

Append en prepend methods for tuples #7305

Closed
scabug opened this issue Mar 26, 2013 · 3 comments
Closed

Append en prepend methods for tuples #7305

scabug opened this issue Mar 26, 2013 · 3 comments

Comments

@scabug
Copy link

scabug commented Mar 26, 2013

If tuples would have append and prepend methods a lot of libraries would not have to generate Class1 - Class22 definitions. Different methods of appending and prepending to tuples are described in this StackOverflow post: http://stackoverflow.com/questions/15349439/how-to-append-or-prepend-an-element-to-a-tuple-in-scala

I would recommend the simple solution by Rex Ker: http://stackoverflow.com/a/15349965/596816

It seems (from my naive perspective) like a small addition with big effects on code size (and generation challenges) in a lot of libraries.

@scabug
Copy link
Author

scabug commented Mar 26, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7305?orig=1
Reporter: Erik Westra (eecolor)
Affected Versions: 2.10.1

@scabug
Copy link
Author

scabug commented Apr 18, 2013

Erik Westra (eecolor) said:
I found out it was not as easy as I expected. I have edited my answer at the stackoverflow question to list the implementation I am using now.

If you are not planning to add similar Tuple operations to the standard library, could you respond here? I could then create a small open source library that adds them.

@scabug
Copy link
Author

scabug commented Apr 21, 2013

@paulp said:
There are no small additions. We will most likely not be adding features of this kind to the library in the near future.

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

No branches or pull requests

2 participants