3 ms·
> The fundamental problem of shells is they are required to be two things. > A high-frequency REPL, which requires terseness, short command names, little to no
by lisper 4y ago
> The fundamental problem of shells is they are required to be two things.
> A high-frequency REPL, which requires terseness, short command names, little to no syntax, implicit rather than explicit, so as to minimize the duration of REPL cycles.
> A programming language, which requires readable and maintainable syntax, static types, modules, visibility, declarations, explicit configuration rather than implicit conventions.
> And you can’t do both. You can’t be explicit and implicit, you can’t be terse and readable, you can’t be flexible and robust.
Of course you can. Lisp is an existence proof. You get the best of both worlds by starting with a simple dynamic language and adding declarations and type inference on top in a backwards-compatible transparent way.
Just because no one does this doesn't mean it can't be done.
- erichocean 4y ago> Lisp is an existence proof So is Forth. Forth is the first "shell" that ever ends up on a new piece of computing hardware. You get a REPL + programming environment from scratch by implementing just 28 words in hand-written assembly.[0] Most programmers can get it running in just a few days, even with no prior knowledge. (Lisp is also famously small to implement.) > Just because no one does this doesn't mean it can't be done. 100% [0] eForth, described in 53 pages here: http://www.exemark.com/FORTH/eForthOverviewv5.pdf http://www.exemark.com/FORTH/eForthOverviewv5.pdf