[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 work3 manual
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 19 May 2010 11:25:15 -0300
> Using # on tables with holes is what every other language manual
> would describe as undefined behaviour.
Unfortunately, I think many other language manuals are not good examples
to follow.
In C ---which is a good example--- "undefined behaviour" really means
undefined behavior (e.g., "ignoring the situation completely with
unpredictable results"). Maybe you mean "unspecified behavior"?
But I think this is more related to expectations. As Cuero pointed out,
nobody considers that "random" has an unspecified behavior, even though
it can return anything. As another example, if you get the documentation
for Posix threads, there are very few garanties about anything. (Last
time I read even a single-threaded implementation could satisfy the
specifications.)
I think the main point is whether the result is useful or not. Most
people (not without reason) consider the result of #t on a table with
holes as useless (but Alexander found it useful ;).
-- Roberto