[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.3 work1 Considering math.isinteger or type()
- From: Miles Bader <miles@...>
- Date: Thu, 18 Jul 2013 13:38:20 +0900
Duncan Cross <firstname.lastname@example.org> writes:
>> (In an ideal world, probably we should have a library with those
>> functions we do not use every day (maybe with rawget, rawset,
>> getmetatable, setmetatable, collectgarbage, and some others), but I
>> do not think the change is worth the trouble. Just imagine the
>> endless discussions about what functions should go there...)
> I hope you reconsider this. I have been thinking for some time that
> such an "internals"/"raw" standard library, distinct from "debug"
> which should not be used in production code, would be a valuable
> step to take.
Yeah I agree.
I tend to think that a normal program should _never_ need debug (when
not debugging of course), and one should be able to delete the debug
library without causing problems. I think sandboxes sometimes hide
the debug library entirely, so it's not just a theoretical thing.
I think Lua does need a "random system stuff" library... A common
name for this is "sys."
Various things like rawget, etc, go in the global namespace for
historical reasons, and at least for some of them, because they're
quite often used, and more like "language features," but inevitably
there will be random stuff stuff that's occasionally useful but maybe
a little too rarely used to put in the global namespace (as of course
putting stuff in the global namespace is a little dangerous because of
the potential for conflict with user programs, and so shouldn't be
done too blithely).
Happiness, n. An agreeable sensation arising from contemplating the misery of