On Wed, 30 Oct 2024 08:17:02 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixing test for Console.readln/readLine, ensuring the proper methods are 
>> called.
>
> src/java.base/share/classes/java/io/Console.java line 184:
> 
>> 182:      */
>> 183:     @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
>> 184:     public Console println() {
> 
> Hello Jan, with the introduction of the simplified `java.io.IO` class, some 
> of whose APIs are wrappers around the `java.io.Console` class APIs, it's 
> understandable that we will start seeing new methods being introduced on the 
> `Console` class.
> 
> For this specific new `println()` method on the `Console` class, do you think 
> this method will/should be introduced irrespective of the `IO` class usage? 
> In other words, considering a theoretic case where there may be a situation 
> to abandon the implicit classes preview feature or do it in a different way, 
> would we still want this `println()` method to stay on the `Console`? If yes, 
> then perhaps we should drop the `@PreviewFeature` annotation from this new 
> method and introduce it as a regular new API? Same question for the new 
> `readln()` method on the `Console`.

I don't think this PR is the right place to add the methods permanently to 
`Console`. I am not objecting to that, but it seems the if those would be added 
independently of `java.io.IO`, it needs a separate discussion and decision. And 
I believe that, if needed, that should be done outside of and independently on 
the framework of `java.io.IO` and JEP 495, as both of these are preview 
features.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21693#discussion_r1822515952

Reply via email to