lua-users home
lua-l archive

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


Regarding counting from 0 or 1, I would offer a data point with regard to users / customers: Over the course of years, our users who are engineers and scientists, but not software developers, gave us feedback about this. They wanted things to start at 1. Internally, our C++ code always worked with 0-based collections and so we "naturally" reported results in this way. However we found that the user base was generally far happier with results reported as starting at 1.

Michael

----- Original Message ----- From: "Mark Hamburg" <mhamburg@adobe.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Wednesday, May 03, 2006 9:31 AM
Subject: Re: Lua is about to become history


on 5/3/06 2:42 AM, Reuben Thomas at rrt@sc3d.org wrote:

"[Lua] now supports extensible semantics, anonymous functions, full
lexical closures, proper tail recursion, and coroutines".

Curiously, this list of features is what many languages are proud of
adding as they evolve. It sounds like "Lua started off as a quick hack
with interesting features a, b, and c but has now added all the usual
features of Lisp." You could phrase it alternatively: "Lua now has all
the features expected from a modern dynamic language, as well as
refining its own distinctive features".

Paul Graham made a remark to the effect that all languages attempt to turn
themselves into LISP as they evolve.

As for the 0 v 1 debate, it may be worth calling some attention to in the
history since it is a moderately controversial choice. As for the "correct"
answer, on the one hand Dijkstra made remarks to the effect of expecting
that everyone knows you should start counting at zero. On the other hand,
most real world enumerations start with one rather than zero. Counting from
zero generally labels one as a geek. Probably the greatest issue with the
choice is that for a language that is frequently embedded within C and C++
programs, it requires a mental translation for programmers switching back
and forth and introduces design questions when bridging data structures
between the worlds.

Mark