The Kotlin REPL could be a useful tool, but it doesn’t get any love from JetBrains. If you type in something, your input is repeated on the next line what reduces readability and the result is printed directly after the pointless repeated input.
Welcome to Kotlin version 1.7.10-release-334 (JRE 17.0.3+7)
Type :help for help, :quit for quit
>>> "test".repeat(2)
"test".repeat(2)res0: kotlin.String = testtest
>>>
I’ve even written a ticket to fix it5 years ago, but nothing happened.
Now, it looks like JetBrains and Kotlin are the slow movers. JShell is much better!
| Welcome to JShell -- Version 17.0.3
| For an introduction type: /help intro
jshell> "test".repeat(2)
$1 ==> "testtest"
JShell even has tab completion.
What’s going on, JetBrains folks? Have you given up the REPL? Where is the spirit and development speed of the first years of Kotlin (knowing Kotlin since 2014)? Kotlin is starting to age.
The REPL is officially a legacy now. Sadly support for KI is not very good yet. It has a lot of bugs. But it is open-sourced to a separate project, so people can contribute.
I agree that is urgent to replace the current REPL with Kotlin Interactive Shell.
It’s pity that such a superb language has such bad REPL, while all other competent languages have much better REPLs.
… and even Java, the last mover of programming languages has such a good REPL for some time now. I created a ticket to replace the Kotlin REPL with Kotlin Language Interactive Shell officially. Maybe you want to vote for this ticket …