bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: use of program_name


From: Bruno Haible
Subject: Re: [bug-gnulib] Re: use of program_name
Date: Mon, 9 Jan 2006 14:48:42 +0100
User-agent: KMail/1.5

Paul Eggert wrote on 2006-01-05:
> > (If the interface to it was just set_program_name, it could be private.)
> 
> Yes, that would be a better convention.  This will require revamping
> pretty much everybody that uses program_name, but I think it's worth
> the pain.  What do others think?

GNU gettext already uses set_program_name() instead of direct assignment to
program_name since 2001. The benefits are
  - The same call can be used for initializing the strings used by relocate()
    [relocatable program installation].
  - Works around strange executable naming by libtool, when libtool is used
    to link the program.

Both benefits are small enough by themselves, but show the typical reasons
why a functional interface is better than just a variable: Extensibility and
workarounds/hacks.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]