I would not differentiate scripts and the REPL in the sense I’m thinking here. I do think that what I’m saying here does not apply for more involved package development (which requires then a deeper understanding of the language anyway).
In this other thread (should better be here, actually), @feanor12 suggested an implementation of almost everything I was thinking about.