Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2020 22:13:11 +0100
From:      Steve O'Hara-Smith <>
To:        Tim Daneliuk <>
Cc:        FreeBSD Mailing List <>
Subject:   Re: Multi-line text output via printf() et al.
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, 14 May 2020 15:44:18 -0500
Tim Daneliuk <> wrote:

> However you decide to do it, can we _please_ stop embedding literal
> strings in printf(), python print(), and so forth?  Strings should be
> pulled out as variables into one centrally maintained location in the
> code.  Why?

	That's a good start.

> Because, someday, you may actually want to have your code run
> with output in something other than your native language.  Because
> strings are often reused in several places in the code.  Because you may
> someday actually want to use unicode characters.

	Right, but then you'll probably want to compose strings with
embedded variable content and discover that the order is not fixed across
languages and so you need a more sophisticated interpolation markup than
printf. Then you'll bump into the nightmare that is plural and singular
forms, sometimes with multiple variants of plural. If you display lists you
will find all the fun of sorting (just look at the French rules on sorting
by accent).

	Do not get me started on truncation!

Steve O'Hara-Smith <>

Want to link to this message? Use this URL: <>