lua-users home
lua-l archive

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


On 12/30/10 4:40 PM, Lorenzo Donati wrote:
maybe the problem ... is that most people seem to see Lua tables as an high level data structure

I think that's an encouraged view.

That you can benefit so much from understanding the deeper level, combined with the elegance of the upper, is the shockingly great thing about Lua to me. An eye opener I think. But it works because both levels are that elegant.

Now the table is so intelligently designed underneath that the core principle that things make sense on both levels is violated by #. Maybe beyond a certain smartness that can't be avoided.

I know I will acquaint people with Lua and it will cost time and nerves and people will make that mistake. Or, worse, break code that otherwise ran using #, by inadvertently poking holes in tables, breaking #.

So throwing an error, even if people will complain about that one, too, and have a hard time to understand it, or protest it (e.g. for t[3]=3, t[2]=2, t[1]=1) would still be seconded. Even in the face of an unfortunate but minor performance loss. That's the toughest thing in my view.

Mind you, even if you got it a long time ago, if you ever lead a Lua project, the thing may still bite you badly, because somebody else in your team is falling in that trap. Even if you warned them. Or worse, two people messing each others' stuff up by it.

On 12/30/10 4:53 PM, Lorenzo Donati wrote:
And as for the names: virgin, holes, etc., well the adjective 'inappropriate' is an euphemism.

I know several female colleagues of mine who would rightfully beat with a stick whoever forced them to use such idioms, even in a programming environment.


Also for the religous, |holy == not virgin| won't do, so let's drop it already.

I would like to talk about [0] now.

Just kidding.
Henning