[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Class:function problem
- From: rw20@...
- Date: Thu, 13 Jul 2000 18:26:58 -0400 (EDT)
> <snip>
> >>--------------------------------
> >>$debug
> >>
> >>myFunc = function ()
> >> Test = {}
> >> function Test:init() end
> >>end
> >>--------------------------------
> <snip>
> >Personally I think the code [above] is sensible and clean --- it would be
> >nice if the language would allow it.
>
> I'm curious: How could you consider declaring and calling a function, all
> in the middle of the declaration of another function, clean and sensible?
Well, on closer inspection the code above is a little too bare to give
enough context, but I can see how the above code snippet could be
incorporated into defining a local object class using the same syntax that
is used for global classes and in that sense it make sense and might be
cleanest (by that I mean, having a consistant coding style) way to
implement local objects of a type that are not needed outside of one
function. Certainly not anything that you couldn't work around, but not
something that needs to fail either.
Russ