What's the deal with REPL? Is it really that usefu...
# getting-started
f
What's the deal with REPL? Is it really that useful?
h
REPL?
a
Read Eval Print Loop I'm guessing? It's useful for trying small stuff out Or useful when you've got small one-time tasks you're doing
v
Read Eval Print Loop is useful for experimenting because you get immediate results. Python allows this pretty well.
f
Yea that's what I mean. I've watched different Kotlin tutorials and they all seem to put a lot of emphasis on it.
So I was wondering what is so special about it, I mean I can just try stuff in my main method if it's just a tutorial anyways
b
the point is, (for its use cases) running code under REPL will be faster that recompiling a project to run the code
m
And some,people.wont look at a language unless it has a REPL. I use scratch files in Intellij but obviously that assumes you use intellij.
f
ah I thought REPL was an IDE feature
u
I'm using the REPL sometimes in my Android project to try out some things. It loads all my classes and I don't have to create dummy file with a main function to run it.
m
That’s definitely a use case. Java now has a REPL too. JShell (JDK9 addition I think). REPL’s, and scratch/worksheets definitely have their usages for quick experiments and learnings. Just type some sample code rather than worrying about ceremony of main, compile, run steps.
g
It's still nowhere near a Clojure REPL, with witch you (it' s risky) can debug and fix bugs in production, without deployments.