5 ms·
WoW, it's 2017 and Java finally gets a REPL and it's only 30 years behind the market. Congratulations!
by mapcars 9y ago
WoW, it's 2017 and Java finally gets a REPL and it's only 30 years behind the market. Congratulations!
- supremesaboteur 9y agoThe rest of the world is behind Java in some developments like container-style isolation of different applications in the same runtime environment. However people still mock Java in things the community is behind. Wait till the cool kids discover conatiner managed transactions. Then it will THE GREATEST THING EVAH !!
- sixbrx 9y ago.Net has done such a thing with Application Domains since its very early days on Windows. Recently they've decided it's not worth the trouble to move over to .Net Core. https://docs.microsoft.com/en-us/dotnet/framework/app-domains/application-domains https://docs.microsoft.com/en-us/dotnet/framework/app-domain...
- pawadu 9y agoCould you explain when one would need Java REPL? Also, are you familiar with Groovy and Scala and their intended uses?
- TeMPOraL 9y ago> Could you explain when one would need Java REPL? Like, all the time? REPL becomes an integral part of the programming process if your language has one.
- pawadu 9y agoNot sure I understand, maybe your development process differs from mine. Could you give me an actual example on how you use REPL during development?
- TeMPOraL 9y agoFor iteratively developing a piece of code. For quickly checking what a function X does with arguments Y and Z. For interactively manipulating a data structure until I finally know exactly what transformation I want to do, which I then save in the source code. For exploring and possibly modifying the run-time state of the program. Simply being able to repeatedly invoke functions from the REPL without breaking your flow changes the way you program. It's a completely different experience from the usual edit->compile->run cycle, and even from the TDD edit->run tests cycle. Also, if the language didn't just bolt a REPL on top of itself because it's fashionable, but actually was designed as an interactive programming medium, you'll have powerful introspection and runtime code modification possibilities that together speed up the debugging process. (Experienced readers will know which language families I have in mind here - the ones which surprisingly weren't even mentioned in JEP222 which this article links to).
- pawadu 9y agoThis makes sense if you are using JavaScript or Python. But not Java, which is statically typed and an IDE that takes care of most of the stuff you mentioned. edit: java also has hot swapping of running code.
- TeMPOraL 9y agoI do Java for my $dayjob and I can tell you that while IDE helps a lot with types and moving around the code, it doesn't give you interactivity offered by a proper REPL. (Conversely, a language with a decent support for interactivity enables IDE developers to provide tools further enhancing interactive programming.)
- piva00 9y agoHot swapping breaks in arcane ways that most people won't bother searching how to avoid, code swap is simply considered unreliable by most of my colleagues. But this is anecdotally speaking, of course.
- aisofteng 9y ago
- zzalpha 9y agoFor you. I've programmed in numerous languages that offer a REPL. I've never found them useful. I'm sure you'll now tell me I was using the wrong languages, or just needed to do it differently and by God I'd see the light! I would suggest that instead you accept that not everyone is like you. Everyone's creative process is different. A REPL has never fit into mine.
- TeMPOraL 9y agoI'm not going to tell you you're doing things wrong or you need to see the light. Only that maybe you're missing out on a pretty powerful feature that's really worth checking out.
- zzalpha 9y agoI've been writing software for 20 years. You think I haven't experimented with REPLs from time to time? :)
- pjmlp 9y agoJava already had REPLs in the form of Beanshell, Groovy and Eclipse scratchpad. It's 2017, where are the REPLs for Go and Rust?
- kasey_junk 9y agoI used a REPL in Java right around when they did the name change to J2SE, so that must have been 20 years ago? By the OPs definition it was still 10 years too late though so there is that.
- pjmlp 9y agoDo you remember the name? I know Java since the early releases and the only thing that comes to mind is Beanshell, which was around that time.
- kasey_junk 9y agoIt was some third party thing I found on FTP servers at the time. It might have been Beanshell but I can't really recall.
- jitl 9y agoAlthough there's no REPL provided with Go, I've found that gore (https://github.com/motemen/gore https://github.com/motemen/gore) works pretty well. It feels similar to the old Java REPLs you'd find hidden in Intellij or other Java IDEs -- sometimes you can see the seams in its facade.
- deleted 9y ago[deleted]
- oblio 9y agoThe original Java REPL was called Eclipse