Re: FFI enums are now always boxed

  • From: Mike Pall <mike-1207@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 13:32:01 +0200

Justin Cormack wrote:
> Can you put metatypes on enums now they are boxed? Then you could add a
> tostring anyway by hand.

I thought about that, but then most metamethods wouldn't work for
enums. You can't override __add etc. I think it would raise more
questions than solve actual problems.

[And your own __tostring won't give you the (non-unique) names for
some enum constants without some kind of reflection. No plans for
that right now.]

--Mike

Other related posts: