3 ms·
Ultimately, a good REPL enables you to test assumptions and behaviours before writing a single line of code that rests on them. It can be a life-saver in dynami
by bluetomcat 4y ago
Ultimately, a good REPL enables you to test assumptions and behaviours before writing a single line of code that rests on them. It can be a life-saver in dynamically-typed languages with complex operator semantics and large libraries. How can that operation fail? How does it work on boundary conditions? You can test these behaviours instantly in isolation without ever "guessing" in your code.
- friendzis 4y agoIMO exploration of complex semantics and/or libraries is quite often a bit futile exercise without appropriate boilerplate/scaffolding. Which means ultimately, a good REPL is an advanced debugger with code sideloading and reloading/monkeypatching. Running in isolation (in context of the REPL, not the attached-to program) would be awesome, but not trivial (if possible at all) in many cases. To illustrate, suppose you have some network service (an API in todays talk) and want to play with some form of middleware or new endpoints. You need functional boilerplate to encode, sign, send a request and receive, decode, parse a response. You want to load those parts of the program and play around.