On Sep 19, 2006, at 10:28 AM, Nicolas Cannasse wrote:
First of all, let me say that this is going to sound combative, but it's not meant to be. I just want to understand...
So, with that in mind, here are a few comments:
- Is it true that your array type is not resizable? It seems like adding the ability to change the array length would not affect performance (except when you resized the array, of course).
- It would be useful to have an __call metamethod for objects. In fact, having this would make it possible to create function types with full object semantics, like I mention above.
- Your abstract type has a 'kind' identifier, which is a nice way to identify the type. But is this value unique? If you are using two libraries which create abstract objects, is there a guarantee that their kind values will be different? If so, this means I can simply check kind and then static cast the data pointer and be assured that the pointer will be valid. In Lua I need to access the metatable and compare it with a "prototype" metatable to make sure I have a userdata of the correct type.