[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re: Antwort: global keyword instead of local
- From: "Magnus Lie Hetland" <mlh@...>
- Date: Mon, 28 Aug 2000 19:32:43 +0200
> > Quite the opposite of Lua, I guess. :)
> How do you write a recursive call ? Hope you don't have to
> define f as global!
Nope. You can access variables in outer scopes (including functions,
classes etc.) that aren't shadowed (dynamic namespaces). You just
can't assign to them without declaring them with the global keyword.
I find these semantics to be very useful and intuitive.
>
> Tomas
--
Magnus Lie Hetland (magnus at hetland dot org)
"Reality is what refuses to disappear when you stop
believing in it" -- Philip K. Dick