logoalt Hacker News

amiga386yesterday at 11:12 PM0 repliesview on HN

OK, but you to admit "largely replace bash with the Python REPL" is something of a stretch.

I didn't read the list of languages given by the earlier poster as specific list, I read them as "<list of random programming languages that aren't shells>". And sure, a scripting language is closer to a shell than a compiled language, but I wouldn't say either Python or Node treat shell commands as first-class citizens, as fellow scripting languages Perl and Ruby do... and even the I wouldn't use Ruby or Perl REPLs as shells, because they're still actually programming languages, not text-based user interfaces to your OS.

    Perl:   $x = `ls -l`;
    Ruby:   x = `ls -l`
    Python: import subprocess; x = subprocess.run(args=["ls", "-l"], capture_output=True).stdout
    Node:   let x = (await require('util').promisify(require('child_process').exec)("ls -l")).stdout