ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
genekim 2018-10-21T04:35:37.000100Z

@clojurians.net holy cow, I love reading Clojure code that uses the ghostwheel (>defn) notation. Bare Clojure code without it seems so dangerous and ambiguous. 🙂

gnl 2018-10-21T10:11:58.000100Z

@genekim Glad to see it's not just me 🙂 And it's a common experience when people start moving in the direction of type systems, it's one of those things where it's hard to go back once you've gotten used to knowing immediately and reliably what goes in and out of functions. It kinda spoils you for non-specced/typed code as well, so – sorry about that. 🙂

genekim 2018-10-21T16:07:44.000100Z

I’m writing this down, so that I can write more fully about it later: My observation is that it’s so wonderful to be able to do things like express “this function will return a vector”, call it in a repl, decide that it should be a map, and change the ghostwheel spec so easily. And last night, I made a change and discovered that a function could return nil — it was so easy to just add s/nilable. Having it in the defn form right next to the arguments is just wonderful. There’s something about ghostwheel that enables a sense of focus and flow, with the feeling of safety that types afford. I’d even rate the type experience easier and more fun to use than TypeScript, which I actually really like. (And I’ve certainly had those feeling where as Hickey put it, “feels more like solving a puzzle instead of solving a problem”. Especially when it’s using a library, and I can’t get my head around all the type hierarchies and interfaces.)

Sen 2018-10-22T13:07:04.000100Z

Can relate to that, had just the same amazing experience with Ghostwheel, when I had to do some refactoring, feel secure that nothing breaks after change!

Sen 2018-10-22T13:11:25.000100Z

On the other note though, I wonder if it is possible to leverage Ghostwheel for better Text editor integration like TypeScript for VSCode? It would be very helpful for refactoring to see all the places where a function is used incorrectly after a change in its signature.