On 6 June 2011 18:35, Basile Starynkevitch wrote:
>
> This is why I thought that "modularization" is a distant goal: in my
> very naive opinion, it would mean removing important global data like
> lang_hook, and I still believe that such a patch would be very big: one
> can't remove that variable lang_hook -replacing it by some data
> structure allocated or initialized suitably, which is not a global
> variable- incrementally (and replace it by some data passed somehow).

Of course it can be done incrementally.

You change some functions to be passed that variable as a parameter,
and change their callers to pass the global lang_hook.  Then you do
that incrementally, making more and more functions use a function
parameter instead of accessing the global.  You leave the global in
place until no more functions use it. Then you remove it.

Reply via email to