Re: RFR: 8066870 Add Readable::transferTo(Appendable)

2017-11-19 Thread Patrick Reinhart
Yes, I meant the Reader.transferTo(Writer), and no I just did a quick search over the JDK code base and I would to takle them as a second step. I would make a couple of different patches for the various places due the fact that they are in different parts of the JDK… The question would be if I

Re: RFR: 8066870 Add Readable::transferTo(Appendable)

2017-11-19 Thread Brian Goetz
I presume you mean Reader.transferTo(Writer)?  This seems fine, and you can have a much better implementation for Reader->Writer than for Readable->Appendable.  (Do we get patches for those 30 places too?) On 11/19/2017 3:01 PM, Patrick Reinhart wrote: Having a static method on Appendable

Re: RFR: 8066870 Add Readable::transferTo(Appendable)

2017-11-19 Thread Patrick Reinhart
Having a static method on Appendable instead of a default one seem reasonable to me too. Would it be a problem to have an additional transferTo() method on Readable as in your overload example though similar to IntputStream? My researches of the JDK code base found at least 30 places where a

Re: RFR: 8189102: All tools should support -?, -h and --help

2017-11-19 Thread Jonathan Gibbons
We are already in a hybrid world of old-style and new-style options :-( All the new module-related options added in JDK 9 are "new style", following the guidelines of JEP 293. It does not make sense to add "--" to some of the older tools, that may be going away at some point, and while we

Re: RFR: 8189102: All tools should support -?, -h and --help

2017-11-19 Thread Jonathan Gibbons
On 11/18/17 12:41 AM, Alan Bateman wrote: A question for Jon Gibbons: In JEP 293 the guideline is that tools should support `--help`. Do you think this should be expanded to include `-help`, and `-?` (and maybe `-h` where it make sense)? I think we should standardize on --help, and -h

Re: RFR: 8066870 Add Readable::transferTo(Appendable)

2017-11-19 Thread Brian Goetz
Late to this thread, but ... TL;DR: I think this method, as proposed, is fatally flawed; it should be a static method rather than a default method. We need to be very, very careful about adding default methods like this to highly abstract interfaces like Readable (the -able suffix is often