lua-users home
lua-l archive
Re: Definition of table.insert
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: Definition of table.insert
From
: Henning Diedrich <hd2010@
...
>
Date
: 2011年1月11日 08:05:12 +0100
On 1/10/11 11:50 AM, David Kastrup wrote: [
Putting nil in continuously maintained arrays will cause vast performance problems and unpredictabilities. Just don't. nil is there for a reason, and that reason is _explicitly_ not being a table element.
Like you put it, you should not be able to assign it to a table in any way,
ever.
To 'delete' values, however, you kind of have to --- or at least until you
understand you should simply never delete values ... it's all too difficult.
Not being ironic, I think you are highlighting that it is 'too dangerous'
at that language level, and does not belong ther, to even be able to make
such errors.
You also stress by that, that table must not be seen as one type, but two
in one. I would suggest that's also too complicated. A table should not
behave differently depending on how it has been treated before. Simple
as that in my eyes.
Henning
Follow-Ups
:
Re: Definition of table.insert
,
Michal Kottman
Re: Definition of table.insert
,
Dirk Laurie
References
:
Re: Definition of table.insert
,
Henning Diedrich
Re: Definition of table.insert
,
Dirk Laurie
Re: Definition of table.insert
,
Axel Kittenberger
Re: Definition of table.insert
,
David Kastrup
Prev by Date:
Re: The __newindex metamethod
Next by Date:
Re: Definition of table.insert
Previous by thread:
Table metaphor & implementation wish list
Next by thread:
Re: Definition of table.insert
Index(es):
Date
Thread
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル