bennyxqg / lua-alchemy

Automatically exported from code.google.com/p/lua-alchemy
0 stars 0 forks source link

Document reasons for lack of autoconversion #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quote from chat:

If we drop the need to call as3.tolua() on foo.bar and foo.getBar() where
foo is AS3 object:

Why this would be slow:

We would have to actually call as3.get() on each index operation. We would
have to call as3.type() on the result. If result is function, we throw
newly created AS3 closure away. If it is plain value, we call as3.tolua()
on it. Otherwise we return the value.

Marshalling aross the Lua<->C<->AS3 boundary each time (or dropping Lua if
we rewrite sugar in C).

If foo.bar returned a string and you did a string operation on it, wheich
returned a string, which returned a string....
you might expect to be able to call a chain of AS3 functions but it would
stop when it hit one that could convert to a Lua type and then start
calling Lua functions

Original issue reported on code.google.com by aglad...@gmail.com on 15 Jan 2009 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 26 Jan 2009 at 7:21

GoogleCodeExporter commented 9 years ago
Discussed on TypeConversions  wiki page

Original comment by rstehw...@gmail.com on 1 Feb 2009 at 6:51