# Idea: REPL Driven Development

**URL:** <https://discourse.elm-lang.org/t/idea-repl-driven-development/6114>\
**Category:** Request Feedback\
**Created:** [August 1, 2020, 5:53pm UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114 "2020-08-01T17:53:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![G4BB3R](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/g4bb3r/32/4544_2.png) [@G4BB3R](https://discourse.elm-lang.org/u/G4BB3R)\
**Post date:** [August 1, 2020, 5:53pm UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/1 "2020-08-01T17:53:37Z")

</div>

Today I was trying to solve a bug, and I realised that it would be much easier to solve if we imported a concept from Clojure, called REPL Driven Development.

I was thinking about the possibility of the elm debugger to have an REPL inside it, with full access to a variable model that contains the current selected state in the debugger, plus access to every module in the project. I think developing and debugging this way would be much easier.

Would it be possible, since elm has static typing?  
What do you think about it?

---

<div class="post-metadata">

**Author:** ![DullBananas](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dullbananas/32/3709_2.png) [@DullBananas](https://discourse.elm-lang.org/u/DullBananas)\
**Post date:** [August 1, 2020, 8:19pm UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/2 "2020-08-01T20:19:40Z")

</div>

in-browser repl is mentioned here [https://github.com/elm/projects](https://github.com/elm/projects)

---

<div class="post-metadata">

**Author:** ![G4BB3R](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/g4bb3r/32/4544_2.png) [@G4BB3R](https://discourse.elm-lang.org/u/G4BB3R)\
**Post date:** [August 2, 2020, 2:00pm UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/3 "2020-08-02T14:00:05Z")

</div>

Thanks DullBananas! I remember about this project, but I thought it was a simple web REPL. Re-reading now it is clear that Evan was saying about the same thing as me! I’d love to work on this, but I am not sure wether those projects are still desirable. I’ll try anyway.

---

<div class="post-metadata">

**Author:** ![yosteden](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/yosteden/32/5113_2.png) [@yosteden](https://discourse.elm-lang.org/u/yosteden)\
**Post date:** [August 3, 2020, 12:07am UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/4 "2020-08-03T00:07:56Z")

</div>

A Clojure-style REPL would be awesome!

Keep in mind that Elm’s static type system can make things a bit trickier for sending functions on the fly through a REPL. In particular if you rebind names like you do all the time in Clojure (e.g. rebind x = 5 to x = 6), you’ll want to double-check that the types still line up. One particular strategy might be to disallow rebinding of names, except for rebinding the global update and view names (updating the model is a bit trickier, but that’s true in Clojure as well, changing the structure of things in atoms in the wrong way is the number 1 thing that forces me to restart a REPL session), and only allow new names to show up.

---

<div class="post-metadata">

**Author:** ![yosteden](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/yosteden/32/5113_2.png) [@yosteden](https://discourse.elm-lang.org/u/yosteden)\
**Post date:** [August 3, 2020, 12:52am UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/5 "2020-08-03T00:52:16Z")

</div>

Also, if you haven’t used it before, something like `elm-live` ([https://github.com/wking-io/elm-live](https://github.com/wking-io/elm-live)) gets you a lot of the way there. You at least get on-the-fly reloading without needing to restart your app.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [August 13, 2020, 12:52am UTC](https://discourse.elm-lang.org/t/idea-repl-driven-development/6114/6 "2020-08-13T00:52:18Z")

</div>

Closed on August 13, 2020, 12:52am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
