lua-users home
lua-l archive

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


> 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