This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: [setup] Inaccurate message: See /setup.log.full


On Sat, 1 Feb 2003, Max Bowsher wrote:

> Igor Pechtchanski wrote:
> >> just do: < return "the log"; >, and remove the bad_file variable?
> >
> > Hmm.  Personally, I prefer to use named constants whenever possible.
>
> It seems a little silly to use a constant when it is required only once.

I know, but your programming style is beaten into you when you learn
programming, and is usually very hard to unlearn. ;-)

> > However, static variables aren't the way to go -- I must have been
> > programming too much Java lately... :-)  I should have used a
> > #define, but then got a better idea - that string should really be a
> > resource, as it's a phrase, not a filename.
>
> General question:
>
> What advantage do resources give us over string literals, for messages that
> are only used once in setup?
>
> Max.

Resources have the advantage that whole resource tables can be substituted
at once.  If we ever want to internationalize setup, for example, all
that'd be needed is translating the resource file.  Having hard-coded
string constants sprinkled all over the code makes translation impossible.
Not that anyone has any plans to translate setup any time soon...  Again,
I guess it's a question of programming style.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]