[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: use readable $(cmd) syntax instead of unreadable `cmd`



Jari Aalto <jari.aalto@cante.net> writes:

> FOREWORD
>
>     I have seen following construct to be used in shell-context
>     (makefiles, sh-scripts, Perl):
>
>       `cmd` [1]
>
>     However, the POSIX standard and SUSv[23] declares alternative way of
>     accomplishing the same with in *sh context:
>
>       $(cmd) [2]
>
>     I would see following problems quality wise with [1]:
>
>     - The backtick version is not easily readable in high resolution screens
>       or in terminals with small fonts 
>
>     - There may be problems in distinguishing character ' from ` with sme
>       particularly selected font.
>
>     - The missing backtick is hard to find in highly quoted context, where
>       single, double quotes and backticks play the code tune.
>
>     - The backtick is awkwardly located in some keyboards. (possible
>       orphan/adopt/NMU maintenance problem)
>
>     - Lastly, isually impaired people have problems with non-easily
>       dintinguishable content. ' and ` fall into this category.

I am 100% blind, and I use ``.  Its not that braille does care
if glyphs are undintinguishable...  Your argument talks
about visually impaired people that still use their eyes for reading...
And it sounds rather contrived if you ask me.

I wouldn't consider `` usage a bug, not at all.  In fact, since
there is $(()) and $(), I consider `` more clear.  If you talk
about unreadability, sed expressions are probably something you should
try to replace :-).  There are surely tons of other things you
could patch in typical shell scripts that make them more readable
and maintainable.

-- 
CYa,
  Mario

Attachment: pgpnbHgCZ9DAH.pgp
Description: PGP signature


Reply to: