Marco Zanetti
12/08/2024, 1:26 PMreadline
and println
and run it (see the first picture).
Now the second part: I wrote (with a little help from a neighbour AI) a set of extension functions meant to override the basic instructions of the language with italian ones (see the second picture below). These extensions work fine in a kotlin standard environment and I was able to write some short funny programs (see the third picture). I’m not able to import these extension functions in the kotlin script though, so at the moment I’m stuck because it seems to me I have to choose between
• having a standard kotlin environment, no readln() and no standard input from the user if I’m using a IDE (and I’d like to, because of autocompletion and stuff) but I get the benefits of the extension functions in italian
• using kotlin script, I can read from user’s input in the console of the IDE but I can’t import the extension functions
It hurts me, since I like the scripting part and I love the old school text-only interaction with the user, but I don’t want to be limited to have everything in a single file, since I’d like to teach him about functions as well and I don’t want things to get bloated.
Do you happen to have any suggestion for a frustrated father? 🙂
Thank you
Marcoedrd
12/08/2024, 1:43 PMhaving a standard kotlin environment, no readln() and no standard input from the user if I’m using a IDE (and I’d like to, because of autocompletion and stuff) but I get the benefits of the extension functions in italianWhat problem are you facing with
readln
when running a main
function?edrd
12/08/2024, 1:44 PMhfhbd
12/08/2024, 1:48 PMMarco Zanetti
12/08/2024, 1:52 PMMarco Zanetti
12/08/2024, 1:52 PMKlitos Kyriacou
12/09/2024, 9:43 AMMarco Zanetti
12/09/2024, 10:05 AM