News for hackers. Stuff that matters.
Re:The sky is not falling – about the supposed end of dynami... by wtetzner on Sunday November 29, 2015 @11:40AM (#10645055)
> A language like Haskell pretty much precludes having REPL integration as you can't just run any top level expression without going through the main.

What? Why not? I know people who pretty much use the REPL (GHCi) as their primary method of developing in Haskell.

Re:The sky is not falling – about the supposed end of dynami... by yogthos on Sunday November 29, 2015 @11:50AM (#10645106)
Let me give you an example of my typical day working with Clojure. I will start the app then connect my IDE to its instance. When I work on any code I write it in the context of the running application. I have access to all the state that's been built up, I can leverage user sessions, database connections etc.

Let's say I'm writing an endpoint to serve some data to the client. I would go to my db namespace, write the function to query the db, run the code and see what it's doing. I'll modify and run it until it does what I want. Then I might go write a controller and do the same thing, and so on.

At each point I have my code running within the context of the app, anything I write in the editor can be evaluated modified, and inspected.

This workflow simply doesn't exist in Haskell last I checked.

Re:The sky is not falling – about the supposed end of dynami... by tome on Sunday November 29, 2015 @12:01PM (#10645163)
I'm not aware of any simple way to get up and running like you are describing in Haskell, no. But it's unclear whether you are saying that such a thing cannot exist in a statically typed language, or whether it just does not at the moment. Can you clarify?
Re:The sky is not falling – about the supposed end of dynami... by yogthos on Sunday November 29, 2015 @05:47PM (#10646445)
In case of Haskell it's due to the fact that you can't just evaluate any top level form without going through the main. I'm sure it would be possible to design a statically typed language that's REPL development friendly, but none exist currently.
Re:The sky is not falling – about the supposed end of dynami... by marcosdumay on Sunday November 29, 2015 @06:49PM (#10646713)
Ok, I either don't get what you are saying, or you never really tried Haskell's REPL for real.

I've probably run most of the modules I've written in Haskell on the REPL, normally without importing the main one, because I use it for early-stage testing. I've run DB interfaces, network abstractions, and, of course, lots and lots of pure stuff. Just like you describe doing for Clojure.

Ok, I don't use an IDE that run stuff automatically at the REPL. On Haskell I import the interesting module, and run it. There is at least one IDE that connects with ghci, but I don't like it, and don't know how far it takes debuging (at a minimum, it evaluates your code and tells you the type of anything - I've tried this).

Re:The sky is not falling – about the supposed end of dynami... by belovedeagle on Monday November 30, 2015 @01:07AM (#10648043)
This is simply misinformed. GHCI can evaluate/run the IO monad. Syntax: to run and throw away the result, simply type an expression with type IO a: it will be evaluated to IO a, then executed. If GHCI can show values in a, it will (unless a=()). To get the value, say var <- expr.