[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua, LuaJIT2 and differences with the length operator
- From: Tony Finch <dot@...>
- Date: Tue, 4 Jan 2011 18:24:24 +0000
On Tue, 4 Jan 2011, Leo Razoumov wrote:
> On Tue, Jan 4, 2011 at 11:58, Tony Finch <dot@dotat.at> wrote:
> > On Tue, 4 Jan 2011, Leo Razoumov wrote:
> >>
> >> And how exactly I am supposed to do this job? E.g., how can I test
> >> that an array t coming my way from someone else's library has no
> >> holes?
> >
> > 1: Don't bother. It's the caller's responsibility to obey your API
> > requirements.
>
> Option 1: does not help here. "Donot bother" is another way of saying
> that the language does not help you here and that one needs to rely on
> some other "out-of-band sigalling" mechanisms to achieve desired
> behavior.
Right. This kind of consistency checking is a job for your unit tests and
debugging support code. That way the run-time API implementation can
assume its callers are correct.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
HUMBER THAMES DOVER WIGHT PORTLAND: NORTH BACKING WEST OR NORTHWEST, 5 TO 7,
DECREASING 4 OR 5, OCCASIONALLY 6 LATER IN HUMBER AND THAMES. MODERATE OR
ROUGH. RAIN THEN FAIR. GOOD.
- References:
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov
- Re: Lua, LuaJIT2 and differences with the length operator, Dirk Laurie
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov
- Re: Lua, LuaJIT2 and differences with the length operator, Tony Finch
- Re: Lua, LuaJIT2 and differences with the length operator, Leo Razoumov