Surely, the argv global-constant proposal is cool.  What is being proposed is
is a modest extension, namely introducing a constant that is initialised with a
copy of the command-line arguments.  Cannot this sit along side the existing
proposal, with each mechanism being used appropriately.  I can think of many
programs where I would quite usefully use the global constant -- I suspect all
of them.

I cannot understand how it would break modularity.  If an application needs
such flexibility, which, surely, the great majority don't, then they can use
standard structuring techniques to achieve this: passing the arguments around
explicitly.

But hold on a moment.

What happens if you have a Stoye-style process model in which you are kicking
off processes by running `main' programs from a shared repository of program
modules.  Now each of the processes would be a separate program with its own
command-line arguments, but the global-constant proposal cannot deal with this
as many processes with different arguments would be executed from the same
collection of modules.  Many hackful solutions exist to get around this problem
to be sure, but the proposal would seem to be decidedly out of place with this
multi-process execution model.

The death-wish-avoiding pragmatist in me still thinks that Simon's proposal is
useful though.

Chris Dornan



Reply via email to