local variables in bash

Levi Pearson levi at cold.org
Sat Feb 14 18:58:12 MST 2009

Stuart Jansen <sjansen at buscaluz.org> writes:

> On Fri, 2009-02-13 at 18:56 -0700, Chris wrote:
>> On Thu, Feb 12, 2009 at 5:24 PM, Merrill Oveson <moveson at gmail.com> wrote:
>> > This is a problem with bash
>> Problem with bash?
>> Because its behavior happens not to align with your prejudices about
>> scoping rules?
>> There's nothing inherently right or wrong about dynamic scoping,
>> though it might serve as tinder for some future plug.org flamefest.
> Uhm, actually there is something wrong with dynamic scoping. Experience
> has taught that it makes writing bug free applications harder.

I would say that there's something wrong with a procedural (or
functional) language that still uses dynamic scoping by default.
Dynamic scoping itself is a very useful tool when used at appropriate
times, and there's a reason it sticks around in languages like Common
Lisp and Scheme as an alternative to the default static scoping.

For whatever reason, shell essentially stopped evolving as a scripting
language a long time ago.  Probably due to the desire for
compatibility.  It's a shame we're stuck with such a lousy, worthless
piece of garbage language as the default today.


More information about the PLUG mailing list