3 Replies - 6754 Views - Last Post: 13 September 2014 - 02:44 PM

#1 macosxnerd101  Icon User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12134
  • View blog
  • Posts: 45,117
  • Joined: 27-December 08

Programmers Could Get REPL in Official Java

Post icon  Posted 11 September 2014 - 07:29 AM

Quote

Proponents of open source Java are investigating the possibility of formally adding a REPL (Read Evaluate Print Loop) tool to the language.

Java advocates are considering REPL as part of Project Kulla, currently under discussion on the openjdk mailing list for open source Java. Featured in Lisp programming, REPL expressions replace entire compilation units; the REPL evaluates them and offers results. With REPL, the overhead of compilation is avoided for looping operations, says Forrester analyst John Rymer.

"From a developer perspective, it's nice to be able to interact with the code while it's running in real time without having to recompile/redeploy," analyst Michael Facemire, also of Forrester, says.

REPLs already are featured in most dynamic and functional languages, including Scala, says Scala founder Martin Odersky in an email. There have even been REPLs available for Java before, he says. A Java REPL implementation has been available online and forkable on GitHub.


http://www.javaworld...icial-java.html

Is This A Good Question/Topic? 3
  • +

Replies To: Programmers Could Get REPL in Official Java

#2 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2386
  • View blog
  • Posts: 5,008
  • Joined: 11-December 07

Re: Programmers Could Get REPL in Official Java

Posted 11 September 2014 - 09:08 AM

Interesting news.
Is it something to be excited about?

It would be good for beginners, at least. "Hello World 101" tutorials in most languages start with the REPL and for good reason. There's nothing like being in the environment to get a grasp of things like variables, instances and references.

What Would be really cool is the be able to get a running Java program to go into REPL mode. If you can interrupt a thread to do that then most of the value of Eclipse's debugger and its ilk vanishes. In fact, what you are left with is more powerful.

Other than that, I'm not really excited. LISPers love their REPL. I've played with LISP but I always ended up writing files of code and executing them. Can anyone fill me in on what I was missing put on?
Was This Post Helpful? 0
  • +
  • -

#3 jon.kiparsky  Icon User is online

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10625
  • View blog
  • Posts: 18,183
  • Joined: 19-March 11

Re: Programmers Could Get REPL in Official Java

Posted 11 September 2014 - 06:42 PM

I do most of my python switching back and forth between source and the interpreter. I find this encourages small steps, where if I have to compile and run the whole program then I incline towards larger functions, because of the overhead. Smaller functions typically mean less debugging overall, so this usually works out well.

Of course, this would require good emacs integration. Don't know if that'll really turn out to be anybody's preferred itch to scratch.
Was This Post Helpful? 0
  • +
  • -

#4 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2386
  • View blog
  • Posts: 5,008
  • Joined: 11-December 07

Re: Programmers Could Get REPL in Official Java

Posted 13 September 2014 - 02:44 PM

I'd like to see that workflow on a real system. I did a bit of hunting today and I found lots of videos showing beginners how to use a repl or showcasing the features of a fancy repl, but nothing to showcase development using a repl. Contrast that with TDD. If you google for "TDD video" you get loads of videos tutoring and mentoring TDD, yet I can't find anything similar for development in a REPL.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1