SimpleIO in JEP draft 8323335

forax at univ-mlv.fr forax at univ-mlv.fr
Mon Feb 19 12:09:17 UTC 2024


----- Original Message -----
> From: "Cay Horstmann" <cay at horstmann.com>
> To: "Remi Forax" <forax at univ-mlv.fr>, "Brian Goetz" <brian.goetz at oracle.com>
> Cc: "amber-dev" <amber-dev at openjdk.org>
> Sent: Monday, February 19, 2024 9:14:31 AM
> Subject: Re: SimpleIO in JEP draft 8323335

> On 19/02/2024 09.03, Remi Forax wrote:
> 
>> In the other hand, i'm pretty sure "print" should be removed, because it's
>> confusing to have both "print" and "println" (at least there is not "printf")
>> and the semantics of "print" is not obvious for beginners ("println" and
>> "readLine" are line oriented, but "print" is not).
> 
> The absence of print without a newline is a sharp edge for beginning Python
> programmers, who have to learn about print(something, end='') as soon as they
> want to print something like
> 
> *
> **
> ***
> ****

for (int i = 1; i <= 4; i++) {
    println("*".repeat(i));
}


Both print() and Scanner are using an implicit IO state which is "where you are ?".
They are both not simple.

> 
> --
> 
> Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com

Rémi


More information about the amber-dev mailing list