JEP 495 Question
Ethan McCue
ethan at mccue.dev
Fri Nov 8 15:24:32 UTC 2024
While there is a deeper dive to do on why exactly JShell does not fit the
bill, I don't think this is actually an objective:
> Provide a friendly environment for people starting out learning Java to
get familiar with it
At least not as a terminal goal. Yes, that's how we have been talking about
it. It's not really accurate though.
The *goal* is seems more akin to "improve the experience of learning and
teaching java as a first language". Learning and teaching don't stop after
the first week or two. Classes not being front-loaded has the potential to
deeply affect the order in which things are taught.
The JEP kinda hints at this with
* Offer a smooth on-ramp to Java programming, so that instructors can
introduce concepts in a gradual manner.
* Help students write basic programs in a concise manner, and grow their
code gracefully as their skills grow.
I think the metaphor of an on-ramp might be limiting imagination. When you
get on the on ramp you are there for a short period of time and then get
straight into the flow of traffic. You "get up to speed" and then go full
speed from then on.
If I'm clawing for a metaphor I'd say I care more about having a "gentle
slope." Yes, getting to the top of the mountain might take 5 hours. But so
long as we reduce or minimize the times you need to break out climbing gear
or have points in the map that say "exercise for the reader" that's fine.
On Thu, Nov 7, 2024 at 6:31 PM Archie Cobbs <archie.cobbs at gmail.com> wrote:
> On Thu, Nov 7, 2024 at 2:47 PM Kenneth Fogel <kfogel at dawsoncollege.qc.ca>
> wrote:
>
>> I dislike Python because it is an untyped language, but we cannot ignore
>> that:
>>
>>
>>
>> Python: loan = input("Loan: ")
>>
>> makes more sense to those starting out than:
>>
>> Java: var loan = Double.parseDouble(readln("Loan: "));
>>
>
> I perceive a disconnect here between the objective and the assumed
> mechanism to achieve that objective.
>
> If the objective is "Provide a friendly environment for people starting
> out learning Java to get familiar with it", why does the mechanism have to
> be "Make changes to the language" ?
>
> For example, couldn't you use JShell to build a sufficiently "friendly
> environment"?
>
> $ cat friendly.jsh
> double input(String prompt) throws Exception {
> System.console().printf("%s", prompt);
> return Double.parseDouble(System.console().readLine());
> }
> $ jshell friendly.jsh
> | Welcome to JShell -- Version 23
> | For an introduction type: /help intro
>
> jshell> var x = input("Loan: ")
> Loan: 123
> x ==> 123.0
>
> Etc.
>
> -Archie
>
> --
> Archie L. Cobbs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20241108/25927a76/attachment-0001.htm>
More information about the amber-dev
mailing list