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日 13:25:43 +0100
Hi Steve,
On 1/11/11 12:59 PM, steve donovan wrote:
[
It would be convenient to have an animal called 'nada', which behaves like nil, except in a table context (Mark Hamburg has made such a suggestion, but was shot down for trying to introduce a null/undefined distinction from _javascript_).
Don't you think that's just getting too complicated?
You could kind of scale this up further with every next nesting of
abstraction, I think. E.g. A null, then an undefined, for other
application, where nil or nada should be preserved as values
expressing something else than controlling the behavior of the
next control structure or function. Eof, error ... I do like Erlang's
atoms, no question about that.
But it would not befit Lua I think, even where it obviously made
sense. --- A clean implementation of atoms, yes, by the way.
[
Yes, a __type metamethod would be nice (especially if it can work on this level) but I imagine it would make type() more expensive.
The cost of one table look-up. Not worse / moew often than
__newindex is being checked for, I think.
Henning
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
Re: Definition of table.insert
,
Henning Diedrich
Re: Definition of table.insert
,
Dirk Laurie
Re: Definition of table.insert
,
steve donovan
Prev by Date:
Re: the purpose of lightuserdata
Next by Date:
Re: C API question
Previous by thread:
Re: Definition of table.insert
Next by thread:
Re: Definition of table.insert
Index(es):
Date
Thread
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル