top | item 43182152

(no title)

ambivalence | 1 year ago

Work on what you want, so don't let me deter you. But in my personal case, what pushed me from fish to xonsh was that I could never quite internalize the way it wanted to do functions, if statements (and tests inside them) and loops.

Once you were reading code, it made sense for the most part. But when I had to write a new multiline command or a script, I had to look things up in documentation constantly. For my brain "similar but different" was torture, not an advantage.

With Xonsh you get real Python and this solves all my problems. As soon as you learn what $VAR, $(CMD), and @EXPR do, you're good to go!

discuss

order

aterp|1 year ago

I hear you, real Python has its benefits :) The way I see it, these are different approaches to solving similar (but still quite different) problems. In the case of rad, it's just a language, it's not trying to replace your shell, but the fact that it's only Python-like might indeed deter some people. But - it also opens up some unique syntax that can be tailored really well to CLI scripts. For example, the syntax for args [1] or json "rad blocks" [2], as I've called them.

[1] https://amterp.github.io/rad/guide/args/#arg-declarations

[2] https://amterp.github.io/rad/guide/rad-blocks/#basic-example