LWN.net Logo

Uh printf is clear?

Uh printf is clear?

Posted May 28, 2005 14:42 UTC (Sat) by renox (subscriber, #23785)
In reply to: Removing the quote distinction? by liljencrantz
Parent article: Fish - The friendly interactive shell

printf is powerful and allows complex output format without being too verbose, I agree.

But what printf isn't is "clear"! All the right and left reading matching the format element to the variable makes it not clear at all, especially when there are many variables or long text.

[ off topic rant: I wish that script language would do something like:
print "%8d{$my_variable} %-5f{$my_other_variable}\n", it would be so much easier to read instead of normal printf ]

While replacing `` by () is a good idea as ` are a pain to find in non-QWERTY keyboards, removing the distinction between "" and '' is not good, I agree with liljencrantz here.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds