lua-users home
lua-l archive

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

I don't care whether you buy them.  For
many, me included, they are more natural.

Which "elevator (lift) nomenclature" do you prefer? American or European?

I prefer the Eurostyle, where there's a special name for the floor of a building which is at street level (ground floor, erdgeschoss, rez-de-chaussee), and where you have to go up one floor to get to the first floor of the building (self-contradictory though that sounds when you say it).

OTOH, I can't argue with the logic of the American system, where the first floor of a building (at street level) is called 1, the second called 2, and so forth, but it takes a couple of days in North America (or Japan) to remember that when the elevator signals "1," it's time to get out. If you wait for the next floor, you'll find yourself whisked back up :-)

Of course, the European system is slightly more natural when a building has basement floors, which can be numbered negatively without creating a "gap" at street level. (What I think of as the BC/AD issue. Should there be a 0AD? Or, for that matter, a BC0?)

I still maintain that the problem around nils in tables is more fundamental that the basedness of arrays, since it is a sort of singularity.

Zero-based and one-based arrays are equivalent and can be unambiguously mapped from one to another (IIRC the cardinalities of the natural numbers and of the non-negative integers are the same). The off-by-one problems exist in equal measure in both systems, as an unavoidable consequence of the fencepost principle (Wednesday is two days after Monday. But if you take vacation from Monday to Wednesday, it costs you three days' leave. Doesn't matter whether you consider the week starts on Sunday or on Monday, or at day zero or one.)

'Strong-nilled' tables and 'weak-nilled' tables simply can't robustly be mapped from one to another other than in the internals of the language runtime, IMO. So a language feature to select at run-time whether a table should operate strongly or weakly with respect to nils would surely bury this perennial point of contention eternally, to the satisfaction of all parties.

Not that I feel strongly about it :-)