SimpleIO in JEP draft 8323335
Eirik Bjørsnøs
eirbjo at gmail.com
Mon Feb 19 12:44:00 UTC 2024
On Sun, Feb 18, 2024 at 11:08 PM Brian Goetz <brian.goetz at oracle.com> wrote:
> OK, so is this really just that that you are bikeshedding the name?
> Renaming `input` to `readLine`?
>
Just a thought:
Perhaps there is more to this than just bikeshedding.. At least, there is
an asymmetry here which could affect learners:
"print (line)" is something the *program* does, affecting its environment
(the user)
"read (line)" is something the *program* does, affecting the user,
but ultimately the program state
"input": is something the *user* does (or provides if a noun), having an
effect on the program state
As a learner of programming, I remember trying to "think like the program"
when reasoning about code. Maybe this switch of perspective/subject between
print and input isn't particularly helpful in that regard?
Cheers,
Eirik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240219/57f58a9a/attachment.htm>
More information about the amber-dev
mailing list