a happy new year. Apologies for the word count. The drama is fake, that's clear, yes?
On 1/1/11 3:10 PM, steve donovan wrote:
On Fri, Dec 31, 2010 at 11:58 PM, Henning Diedrich <email@example.com> wrote:So I plead with you, Roberto, for the soul of Lua, as Chris called out, fix # !But it ain't broken, so why fix it? It works precisely as specified.
In my view, for Lua's audience, the spec is broken. First class nil is not an answer,
not for Lua, to my mind. That's perfect as is.
"# is reverse magic. Dark magic, seen from the higher level. It requires understanding
of implementation to 'become' intuitive. But without even the benefits of the usual
over-eager white magic. Lua, for its purity, should shun both, of course."
I put that in quotes.
It's a problem when people pretend that a raw Lua table is the particular data structure they have in mind
Lua gets pretty close to pretend one structure, the table, is all
you ever need, but then without a warning backs out of it with #,
- "a pure array with bounds checking", "a pure associative map where nil can be a key", etc. Unfortunately it is not possible for human programming languages to guess what kind of data structure is actually intended ;)
If speed was no factor, all would be entirely transparent and really only
'a list'. But it is, which brings the implementation level in play. So
only for performance, not for the logic of it, is knowledge about
implementation necessary. And that should be, and is, beyond the concerns
of a segment of Lua programmers. Who not co-incidently may also be less
active in a discussion like this.
So that makes me a champion of imaginary silently nodding masses, of
course. But truth be told, I might take a less noble stand had I not now and
then to answer for mistakes others make in one way or an other. That's what
informs my take on this. Not that I ever in my life would forget the spec of
# again after this thread ... or fight for nil becoming a first class citizen, or
Lua what it is otherwise not. It's in my view "for Lua staying true to itself."
The spec of # as is does not do Lua a favor. I think you could say, it's broken.