3 ms·
This feels a little too strong to me. DrRacket has as its fundamental UI flow a combination of whole-reloaded-file and a REPL, and obviously the creators of Rac
by electroly 4y ago
This feels a little too strong to me. DrRacket has as its fundamental UI flow a combination of whole-reloaded-file and a REPL, and obviously the creators of Racket are intimately familiar with Lisp REPLs.
One problem being addressed is the discrepancy between REPL-based development and non-image-based languages: you have to get your code back out into a source file somehow, without forgetting anything. In image-based languages like Smalltalk and APL, you just save your environment after modifying it interactively; there are no separate source files and the problem does not exist. But in file-based languages, you're stuck using the clipboard to copy code back and forth between the REPL and the source file. It can sometimes be easiest to write the code in the source file, then reevaluate it in the REPL environment. If that process is automatic instead of highlighting specific forms and pressing a button, it can sometimes be a slight productivity boost and less error-prone because you won't forget to reevaluate some change you made in the source.
- Jtsummers 4y ago> In image-based languages like Smalltalk and APL, you just save your environment after modifying it interactively; there are no separate source files and the problem does not exist. My experience with APL was not based on using the image (longterm), but with Smalltalk, there is a source file paired with the image (you can see this with both Squeak and Pharo). And Iceberg has been around for years allowing you to select specific portions to export to or import from git repos as source files. It was preceded by other version control systems that let you export to and import from source files.
- electroly 4y agoDefinitely. Dyalog APL has support for source files, too, but I didn't want to overcomplicate things. The way that it saves environments (i.e. to a binary file or to a source file) is tangential to the point: that it has the ability to save the environment at all. REPLs go best with languages that can save their live environments, so that you don't have to worry about getting your work back out of the REPL environment. If your language can't save its environment, you need some other way to improve the REPL-to-source workflow.
- mumblemumble 4y agoIt's historically been pretty janky, though, and an acknowledged problem within the Smalltalk community. I think Pharo perfected their solution only within the past 10 years.
- greggman3 4y agoA system I used you'd edit the source and press some key-combination that injected the current function only from the editor to the running app