lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




2010/12/13 Enrico Colombini <erix@erix.it>
On 13/12/2010 14.07, David Kastrup wrote:
Of course it is "nondeterministic" since the user created a continuous
part discontinuously which would simply be undefined behavior.

That's what I tried to solve with my earlier idea (non-reversably setting #t to nil if a hole is created, to make the point that "I can't guarantee this is an array") but, apart from my 'solution' being far from elegant, Steve rightly pointed out it would break existing code (relying on the definition of #t in 2.5.5 in the 5.1 refman).


a) #t corresponds to the array part always.

I wholeheartedly agree with Luiz here: "the array part is just an implementation detail". We should approach from the user's side first and look at internal implications later (if ever).

The more I think about the alternatives for #t, the more I like the current choice :-)

--
 Enrico


i think #t can be the *LOWEST* hole of the array-part, or the *HIGHEST* one.

all is acceptable.

or someone can provide lowerhole() or upperhole() functions to handle them.

I mean, if implement *LOWEST* or *HIGHEST* is easy, maybe it's the best choice.