Why would one use TXR Lisp for small programs rather than Python? There are many reasons, but several are immediately striking:
1. Way better REPL experience with multi-line editing.
2. No "import this from that" disease. The entire language/library is simultaneously available.
3. No this.that.foo.bar() disease: The entire language/library is named by flat symbols. Posix things mostly have their normal names:
$ txr
This is the TXR Lisp interactive listener of TXR 244.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
TXR's no-spray organic production means every bug is carefully removed by hand.
1> (sizeof long)
4
2> (getpwent)
#S(passwd name "root" passwd "x" uid 0 gid 0 gecos "root" dir "/root" shell "/bin/bash")
3> (tcgetattr *stdin*)
#S(termios iflag 17664 oflag 5 cflag 191 lflag 35387 cc #(3 28 127 21 4 0 1 0 17 19 26 0 18 15 23 22 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0)
ispeed 38400 ospeed 38400)
There is a package system, but everything predefined by TXR is in one package called
usr, all of which is visible in the
pub package in which code is read by default.
3. Free structure: your code is not a "module" that has to obey someone's conventions.
4. No analog of __pycache__: no pollution of your current working directory. You compile code yourself using (compile-file "yourfile.tl") which pops out a "yourfile.tlo", or use the code interpreted.