But most languages have many features aimed at it. The captcha is that it tends to come bundled on the debugger, instead of in a separate tool. That makes many people fail to recognize them.
I learned about them with Idris and Type-Driven Development by Brady, I've never used them in Haskell but haven't really touched it seriously in a decade now.
ghci> let x :: Int = 1; s :: String = "foo" in x + _
<interactive>:13:46: error:
• Found hole: _ :: Int
• In the second argument of ‘(+)’, namely ‘_’
In the expression: x + _
In the expression:
let
x :: Int = 1
s :: String = "foo"
in x + _
• Relevant bindings include
x :: Int (bound at <interactive>:13:5)
s :: String (bound at <interactive>:13:19)
it :: Int (bound at <interactive>:13:1)
Valid hole fits include
it :: Int (defined at <interactive>:11:1)
x :: Int (bound at <interactive>:13:5)
maxBound :: forall a. Bounded a => a
with maxBound @Int
(imported from ‘Prelude’ (and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
with minBound @Int
(imported from ‘Prelude’ (and originally defined in ‘GHC.Enum’))In my Fast Development workshop I recommend:
Goals are speed (low latency developer feedback), and quality (create something the client expects and values).
Speed: use `entr` or another tool to automatically run tests when a file changes.
Quality: "test" first -- write a test before code, if you have to think about the code. In this way you get high-level dev feedback, before the code is written.
Quality: use the system to calculate your function's result. Then either use "assert 0, value" to emit the result to you the developer, or use the debugger. In either case the computer does the work and you get feedback.
The above three-part process is similar to the OP, "conversational" is a good term for it.
Also, very cool to see reference to Conjure on HN. That plugin is very impressive.
I can get by without a debugger but I think both have their strengths and I want both. Actually I want all three: REPL, LSP, DAP. The REPL layer gets to be super small and simple when LSP and DAP are handling the other harder parts of IDE-ish features.
Don't pick one, have your cake and eat it :) future post I'm planning talks about this sort of trifecta and all of my favourite editor things coming together alongside fast auto-running unit tests.