[oak perl] Lexical vs. Package variables
Sandy Santra
santranyc at yahoo.com
Wed Feb 9 13:13:48 PST 2005
Thanks for the input on this stuff, Zed.
At 05:21 PM 2/7/05 -0800, you wrote:
> > But now I'm grappling with the *basic* idea of scoping:
> > that you're cordoning off a part of your script with a scoped
> > value so that a variable with an identical name elsewhere
> > in the code is unaffected.
>
>It doesn't have much point for a very short script. It is immensely
>pointful for anything longer, though.
Right. Exactly! That's what I've been thinking. But now I'm "graduating"
to larger scripts, so I need to start using "my".
>You're thinking of event-driven programming here, for instance through
>signals. But it's as deterministic as any other programming, just more
>complicated. Lexically scoped variables are no more or less relevant
>in this case than for any other complicated program.
More complicated, yes. But I need to be able to enlarge my thinking so I
can grasp more complicated programming models. I can't believe I'm still
having a hard time "getting" object-oriented programming. So many people
are programming Java!
It's all about learning better.
--Sandy Santra
More information about the Oakland
mailing list