Excellent discussion of how REPL programming enables you to write code incrementally, going beyond what you can do with e.g. ipython or ghci.
https://mikelevins.github.io/posts/2020-12-18-repl-driven/
Related Posts
Over a sufficiently long time horizon, all code you write is legacy code.
Today I learnt that Racket *intentionally* doesn't have a traditional REPL workflow. The authors were concerned about students not understanding the state between the current session and the code on disk.
(Arguably Jupyter has some of these features now.)
https://blog.racket-lang.org/2009/03/the-drscheme-repl-isnt-the-one-in-emacs.html
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.