[in Ruby documentation:]
> > The default variable scope rules for Ruby (default: local) are much
> > better suited for medium-to-large scale programming tasks; no "my,
> > my, my" proliferation is needed for safe Ruby programming

* Dave Storrs ([EMAIL PROTECTED]) [20 Sep 2000 02:08]:
> Actually, this is the bit that interests me. Most times, when you
> create a variable, you *do* want local scope.
[...]

Yes, but you'd need something that is a 'create variable' function.
Otherwise, if you typo you create a new locally scoped variable. That's
not what we want, surely?

The joy of 'my' (and the equivalent declarations in C/Pascal/etc.) is
that it traps such things.


cheers,
-- 
\def\Koschei{Iain Truskett}                    % http://eh.org/~koschei/
\def\WhoAmI#1#2#3#4#5#6{\tt#2#3\it#4#5\bf#6\sl!}\def\i{I}\def\f{i}\def\I
{\if\i\f\f\else\i\fi}\def\Am{am}          \WhoAmI?\I\ \Am\ \Koschei\bye!

Reply via email to