Re: FFI Reflection

  • From: James McKaskill <james@xxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 1 Jun 2012 22:39:18 -0400

On Fri, Jun 1, 2012 at 10:26 PM, Kaj Eijlers <bizziboi@xxxxxxxxx> wrote:
> Well, that would really depend on the use case, no? If you want to do
> metaprogramming (or rather validation of generated/imported code) I'd say
> the more info the merrier. Basically, if it can be exposed I don't see why
> you wouldn't reflect it - I'd rather have too much info available than too
> little.

Larger API = harder to change implementation, more code, more bugs, etc

I'm looking this from the other way. I have no real need to use the
API, but I'm thinking of what would be required to get luaffi to
support it as well. There are aspects of that API which I couldn't
support off the bat. For example luaffi subsumes anonymous
structs/unions at parse time so

struct {struct {int a;};};

is the same after parsing as:

struct {int a;};

Also having a better idea of its intended use cases can focus more on
that aspect.

-- James

Other related posts: