lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, May 13, 2013 at 9:38 AM, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
I don't know ObjectiveC, but from your description there doesn't seem
to be any perfect solution.

Yes, in LuaJava the strategy is first to see if the symbol is a field or property, and only if that fails, then to try for a method. This works, although was rather expensive in the context of Android and now I'm caching per-object whether something is a known field. Which cuts down significantly the amount of garbage generated by reflection and (NB) by 'field-not-found' exceptions.