[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
es and environment
I hate to bring this up, but if it ever looks like there's an appropriate
place to implement process scope variables, I think that would be a very
useful feature. That's an obfuscation for leaving variables out of the
exported environment.
It looks like "local" variables aren't exported, but lexical binding
isn't always convenient.
I have work-arounds (collected from the rc list), but it seems like it
ought to be a language feature. It puts less of a load on the system,
it cuts down on the amount of wierd gibberish people see when they do a
printenv, but most importantly it's more sanitary. Like scoping in any
programming language, it gives you a way to do something in one place
without any risk of unintended effects somewhere else. In the Bourne
shell, I can define a variable name "EDITOR", if that happens to be
convenient, without fear that some child process will see it and react
in an unforeseen way.
Donn Cave, University Computing Services, University of Washington
donn@cac.washington.edu