[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Documentation Markup
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 9 Oct 2009 18:06:57 +0100
On Fri, Oct 9, 2009 at 4:45 PM, Phoenix Sol <phoenix@burninglabs.com> wrote:
> On Fri, Oct 9, 2009 at 2:32 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
>> Lua order is pretty flexible, though you do have to declare local
>> functions up front as locals...
>
> Global functions, too, I noticed. I'm kinda surprised, since there is
> always a compilation step before execution. (But I'm still very
> ignorant of Lua's implementation.)
'function blah() ... end' definition really is only a variable
assignment 'blah = function() ... end'. (Javascript, by contrast,
likes to try to pretend otherwise about its function definitions by
"hoisting" them - which can potentially lead to some odd effects, at
least in IE's implementation [1].)
[1] http://nedbatchelder.com/blog/200812/internet_explorer_mystery_1376.html
-Duncan