[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: callstack recursive environment
- From: Steve Litt <slitt@...>
- Date: Wed, 28 Mar 2012 02:52:23 -0400
On Wed, 28 Mar 2012 00:30:02 -0500
Coda Highland <chighland@gmail.com> wrote:
> > So the only thing that made much sense to me was to use a
> > dynamically scoped global environment. I could turn off the global
> > environment entirely, but that just makes script writers prefix
> > every non-local they use with "something.myvar", which doesn't seem
> > desirable either.
>
> Why not? Especially if that something is "self" it's a pretty
> standard idiom.
>
> /s/ Adam
>
Hey CodeMonkey,
I think Adam has a point. Honestly, I think global variables suck. You
once mentioned that making the programmer prefix them with something is
a bug. I understand your point, but I've found in every language I've
dealt with that global variables resulted in far more esoteric and hard
to find bugs.
I'll keep trying to think of something that works for your situation,
but I have a feeling in the end you'll do what most framewords do and
call object.method() (or object:method(), depending on how you code it).
SteveT