News for hackers. Stuff that matters.
Re:What makes a good REPL? by narrowtux on Monday August 28, 2017 @04:18AM (#15115175)
You could just store your modified state to new variables though
Re:What makes a good REPL? by yorwba on Monday August 28, 2017 @05:18AM (#15115371)
Or you could just make copies of state you want to keep before mutating it. Both mutable imperative code and immutable functional code can emulate each other, so which one to choose largely depends on your preferences.
Re:What makes a good REPL? by junke on Monday August 28, 2017 @07:34AM (#15115850)
In a live-coding session, how does the existing, running code knows that it should look at the new variables instead of the old ones?
Re:What makes a good REPL? by valw on Wednesday August 30, 2017 @03:34AM (#15130321)
Have a look at the video. Having immutable values doesn't mean you have immutable variables / names.
Re:What makes a good REPL? by junke on Wednesday August 30, 2017 @09:25AM (#15131915)
I know, the parent post was saying "you could just store your modified state to new variables", not replace what existing variables are bound to.