lua-users home
lua-l archive

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


> Date: Mon, 07 Apr 2014 09:51:16 +0200
> From: Enrico Colombini <erix@erix.it>
> Subject: Re: mathlib
> 
> A loadable dll/so, as proposed by others, would probably be a better
> choice (especially in the 'lean kernel' scenario where even basic libs
> could be either compiled in or compiled as loadable modules).
> 

Another option is to put the primitive operations that need to be 'C' into
lua_arith, have a simple library wrapper function that makes this available
in
Lua and then implement all the actual math library functions in Lua. This
way you can partition the library any way you want without multiplying the
runtimes or requiring architecture dependent dynamic load binaries.

I do not understand the mindset that assumes everything in the Lua Reference
Manual has to be implemented in 'C'. Why cannot some of the standard
libraries be implemented in Lua?