Re: do function casts ever disappear?

  • From: Henk Boom <henk@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 15:48:18 -0400

On 20 July 2012 14:29, Dimiter 'malkia' Stanev <malkia@xxxxxxxxx> wrote:
> I think that if you keep the value somewhere, it won't get garbage
> collected.
>
> I chose a different path, and I like it better - http://github.com/p3/regal
> -
> it also comes with emulation layer for things missing, like immediate mode
> for iOS OpenGL ES 2.0, logging, error checking, etc.
>
> this way my luajit/ffi portion would not stayed clutter with
> casting/getProcAddress things.

On the other hand, you now have C/C++ code you need to compile where
you previously had only luajit code. I'm not sure how any of the
features you mentioned are harder to implement in the luajit portion
of the wrapper, being just as hidden?

> (And wglGetProcAddress would only work once the context is established,
> which means it cannot be done early, which is the same for regal - but it it
> hides it all from you).

The nice thing about doing it in __index is this pretty much
implicitly isn't a problem.

    henk

Other related posts: