[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mathlib
- From: Tim Hill <drtimhill@...>
- Date: Sun, 6 Apr 2014 12:22:07 -0700
On Apr 6, 2014, at 8:09 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> If you are suggesting something along the lines of "keep math as-is,
>> maybe deprecate pow()", and add a loadable mathx library, then +1
>
> Repeating ourselves: our suggestion involves moving sinh, cosh, and tanh
> from mathlib to the loadable mathx library (which already exists [1]), as
> we do not see (and nobody really addressed that specific point until
> now) them being more used/important/basic/whatever than several other
> functions there.
>
> [1] http://lua-users.org/lists/lua-l/2008-04/msg00435.html
>
> -- Roberto
>
I have a slightly different take on this. I’m going to stick my neck out and say that, even in 5.2, the “require/package” feature still seems clumsy to me. No doubt this is partly the result of the wide variance in the underlying OS models, but it does seem to lack the tight elegance of so much of Lua.
This has given me (and others that I have discussed this with) an aversion to using “require”, since it increases the fragility of a script. To my mind, a script that only uses standard Lua libraries and self-contained code is more robust since it’s only dependency is on standard Lua.
From this perspective, moving the hyperbolics into an external library seems to me not good. Of course, an alternative would be to tighten up “require”, but that has been discussed many many times here.
—Tim