[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table insertion [was: Lua 5.1 (work2) now available]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 04 Nov 2004 14:52:16 -0200
> Whatever operator is used to return the "length" of a table, it would
> be nice if it also could return the length of a string.
Sure.
> "*" does not strike me as intuitive for an operator yielding the length
> of a table. "#" would make more sense to me, but see below.
We thought about '#' first. But '*' is smaller :)
> Any background, why '*' was regarded best..?
It is a common prefix operator; the character is already used in Lua;
and some other languages use it as a length operator (e.g., Icon uses it
as string length operator). And it is smaller than '#' :)
-- Roberto