Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have no problem switching between 1 and 0 based languages and have used both productively; as I said both have their pros and cons. If lua were mostly some standalone language, or even a glue language to the extend python is, there would not be an issue.

So if you mostly write vanilla Lua, yeah, I agree, 1 based indexing will not affect you much (unless you have some psychological hangup). But vanilla lua is to almost all extents and purposes a vastly inferior value proposition to python. And once you try to do some high performance stuff with luajit or terra or use luajit for embedding/glue purposes, the 1 based indexing will immediately become a point of major and utterly needless friction.

So one based indexing weakens Lua chief differentiator: being small, fast and very pleasant to embed or interface to C or C++ with; luajit in particular is probably without compare in this regard. So that's why it's in my view a chief contributor to Lua's failure (not in some absolute sense, but certainly relative to the engineering brilliance that went into both PUC lua and luajit in particular, especially when compared to languages with amateurish design, implementation or both -- such as early php, ruby or python all of which are vastly more successful).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: