On 12/11/2012 9:08 AM, Arne Vajhøj wrote:
> On 12/11/2012 1:58 AM, William Bonawentura wrote:
>> IMHO final code does not need to have any strings literals. Strings
>> should be allways created via out-of-code resources.
>
> In general yes.
>
> There are probably some exceptions. I would not want Java keywords to
> come from an external resource for a Java compiler.
>
> 
>
IMO, about the only things (strings-wise) which really make sense being
moved into external resources are:
default configuration options (debatable, if the config file will
override them anyways);
(potentially) messages intended for human readers or similar (say, to
allow language-specific translations or similar).
if the bulk of the string literals are things internal to the program
(rather than intended for an end user), then it makes little sense to
move them to external resources (IME, most string literals tend to be
program internal anyways, with human-readable messages few and far
between, and most of these in-turn being internal debugging messages).
with user-readable strings, the program could still be developed under a
policy like "if you need the messages in a language you can read, either
learn English (or Japanese or Chinese or similar) or get a dictionary",
so making them external may not make much sense in this case.
even with language-specific strings, unless using magic numbers, a
string may still be needed to refer to them.