I’d like to make greater use of let blocks for testing out code, especially code where I’m defining types so that I can make definitions and play with them to see if what I’m doing works without polluting my namespace and possibly needing to restart my Julia instance.
One thing that’d be really amazing for this would be allowing one to incrementally evaluate code inside a let block. Right now at the REPL if I enter
let
const x = 1
x + 1
nothing happens until I supply an end
. It’d be pretty neat if instead, the REPL evaluates each line inside the let
environment incrementally and displays the output. This could allow one to use a let
block kind of like a REPL mode where you and try things out and then exit without polluting your namespace or requiring restarts. Is such a thing feasible or is it forbidden by the way Julia handles let blocks?