Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] "Go Considered Harmful"



On Wed, 2 Sep 2020 at 16:38, Curt J. Sampson <cjs@example.com> wrote:

On 2020-09-02 14:36 +0200 (Wed), Josh Glover wrote:

> For me, trying to write code without a REPL feels like I have one
> hand tied behind my back.

But GHC includes a REPL! I used to use it almost constantly. It's
particularly handy for inferring and telling you types.

I've used the GHCI REPL a little bit, but I'm certainly not an expert user, so I may be wrong here, but it isn't possible to reload code without losing your state, is it?

The way I use a lisp REPL (Steve: I'm writing "lisp" to mean Common LISP, Scheme, Racket, Clojure, or any other member of the family that I've used and forgotten about... oh, Pixie!) often means executing code to build some state, then being able to evaluate forms in the context of my running program to try things out and develop my code incrementally. I don't remember the details, but I wasn't able to figure out how to get this workflow in GHCI. In fact, the only non-lisp I've ever been able to replicate this workflow in is Elixir (if anyone out there hasn't tried Elixir, I can recommend it so highly! It's such a pleasure to work with).

Again, this might be just a case of the poor craftsman (me) not understanding how to use his tools... ;)

--
Cheers,
Josh

Home | Main Index | Thread Index