[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: local functions revisited
- From: "J. Perkins" <jason@...>
- Date: Thu, 06 Dec 2001 09:25:04 -0500
Would it be possible to enable the syntax:
local function myFunc(params)
I would like to use the ':' sugar for class methods:
function MyClass:myFunc(params)
But private methods need to use the form:
local privateFunc = function(params)
And I don't want to try and convince scripters to use two
different forms, so my class methods end up:
MyClass.myFunc = function(self, params)
which isn't *that* bad, and I'll admit this is all just personal
preference from someone with a C background, but it would be
nice to have a 'local function f()' to go with 'function f()'. I
assume that there is some technical limitation involved, or this
would have been done already.
Jason
379