Re: [dev] Shell style guide

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Fri, 9 Sep 2016 07:27:38 -0700

On Thu, Sep 8, 2016 at 10:29 PM, Anselm R Garbe <garbeam_AT_gmail.com> wrote:
> I appreciate your efforts of coming up with some sh styleguide. A side
> note to that, I prefer calling test explicitely, instead of using the
> weirdo [ ] symlinks in while/if statements.
>
> Nevertheless, after an excursion to sh for several years, I'm kind of
> favouring 9base/rc again, after all. For stali I now tend to adopt rc
> as primary scripting language for the target system as well. For the
> build host environment I would rather stick to sh+make instead of
> rc+mk. We have to live with the fact that a build host environment is
> poisoned with crap bloat to hell anyways. But for ideal target system,
> we should stick to technologies that have been designed with clarity
> and cleanliness in mind. rc is the perfect example for a decent shell
> environment.
>
> When I started 9base and Uriel started werc and other rc-based stuff,
> we concluded that one cannot really write portable scripts with sh.
> You have to rely on a defined userland. The Plan 9 derived userland
> offers this definition. I agree that sbase goes into a similar
> direction, but the danger remains when using sh, that some stuff will
> end up in pretty mixed environments.
>
> For serious stuff like werc, rc was the right choice, because it
> relies on this definite userland environment and hence does not allow
> for ambiguity.
>
> I just wanted to mention this, as this is one of my very recent
> decisions about stali's future.
>
> BR,
> Anselm
>

Well that makes the suckless.org shell styleguide nice and simple:

Use rc.

I like that.
Received on Fri Sep 09 2016 - 16:27:38 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 09 2016 - 16:36:12 CEST