-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[SUPERSEDED] Use ellipsis instead of silent truncation in stringOf #10178
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
Conversation
@SethTisue it's so pretty. I wonder if you'll feel sorry if 2.13.10 doesn't have it. I mean the rueful thoughts that occur to you years later while tarrying in a coffee shop during an unexpected rain storm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new pretty version is not yet in use, IIUC?
if (x.productArity == 1 && !x.productElement(0).isInstanceOf[Boolean]) | ||
s"${x.productPrefix}(${inner(x.productElement(0))})" | ||
else | ||
_toString1(x, inner(_)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_toString0
is unused, and this looks almost like it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not unused forever, or at least by me in my REPL.
* @param arg the value to stringify | ||
* @param maxLength limit the length of the result string | ||
* @param verboseProduct extra user-friendly | ||
* @return a string representation of arg. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, but the Scaladoc should be on the 3-param overload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that, but my thought was, scaladoc should be smart enough to figure out overloads. I just drove someone to the airport, and my ordinary Honda knows how to stay inside the white lines!
Those thoughts take on extra existential piquancy when they occur during my travels in Europe. 🧑🎨🪗 An ellipsis does seem strongly preferable to silent truncation, so presumably we're going to merge this, but Lukas's nits seem valid, and I'd also like my memory refreshed about:
|
I think we can close this in favor of #10180, where the nit is also addressed |
I need to add a comment on the (unused) API on the other PR. |
Fixes scala/bug#12337