Hacker News new | past | comments | ask | show | jobs | submit login

why not just run interactive python when you need it?

A shell should be interoperable between users. If everyone on your team uses xonsh, then great, by all means. Otherwise, you're in your own little esoteric world.

a shell has to be stable, a python environment is not. There is just too many ways a python package can break. If python had a good package system perhaps it'd bring something to the table.. but python is by far the winner of the programming language with the worst packaging ecosystem i've seen and used.




an interactive shell really _doesn't_ need to be interoperable between users in the first place, but even a scripting shell doesn't need this either.

This is what the shebang in your scripts is for. If you need to write a script that is going to get shared, you have (at least) two perfectly good options:

  - use bash (or some lowest common denominator)
  - use a fancier (better?) shell, like fish/xonsh/nushell/oil and just require that everyone have that shell installed (they don't have to use it as a daily driver). 
xonsh is not really any different from other shells - it can be installed as an isolated environment with its own runtime (in this case Python)

A third and usually better option is to use a dedicated scripting language - this is of course an opinion, but many people have recognized that anything longer than ~50 lines and that will need to be iterated upon in the future is a bad fit for a shell-like language.


You can use your own tools in addition to those necessary for team stuff. In fact, I'd recommend it. There's no point using the same tools and rigour that you would with a team. Use a different version control system. Use a different shell. Have fun with your computer!


> why not just run interactive python when you need it?

Because writing shell scripts in Python/xonsh is much more pleasant than in Bash.


You can run the bash shell interactively and write python scripts

why limit yourself to just one. I'm just talking about the interactive shell here..


> why limit yourself to just one?

That's precisely the rationale behind xonsh! You're not limited to Python. You're not limited to Bash. For the most part, you get the best of both worlds. And you can still run Bash scripts in xonsh.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: