lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Francesco Abbate <> writes:
>> Nonetheless, I think more core support would be necessary to get
>> around the portability issues (if that's even possible, though my
>> guess it is for at least some reasonable subset of the functionality).
> I guess this discussion will not bring us anywhere if neither Roberto
> or Luiz step forward to say a word on this idea :-)

It also occurred to me that while there are probably many parts of FFI
which could be made more portable, there are some important operations
which are simply impossible to do portably at runtime in standard C.

One famous example is calling a function with an arbitrary signature.
I.e. if you have a function pointer, and a list of the argument types
(only known at runtime), and some way of getting the values for the
arguments, there's no really portable way to call the function pointer
with those arguments.

Unfortunately that exact operation is also one of the main uses of FFI
... :(


Carefully crafted initial estimates reward you not only with
reduced computational effort, but also with understanding and
increased self-esteem.         -- Numerical methods in C,
  Chapter 9. "Root Finding and Nonlinear Sets of Equations"