[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __methcall
- From: Rici Lake <lua@...>
- Date: Thu, 4 Nov 2004 13:08:10 -0500
On 4-Nov-04, at 12:58 PM, Daniel Silverstone wrote:
Personally I don't think it's a question of "hiding" or "making safe"
--
I think it's far more a question partitioning the namespace a little
"making safe" is important. A script, even a malicious one, ought not
to be able to make Lua segfault or execute arbitrary C code. To prevent
that, userdata methods must check the type of their self argument.
Arguably, that is good programming style, but it is quite expensive to
do on every method call. So if it is possible to guarantee that the
type of the self argument is correct, that is probably better.