[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tables and lists
- From: Leo Razoumov <slonik.az@...>
- Date: Wed, 5 Jan 2011 08:04:47 -0500
On Wed, Jan 5, 2011 at 06:36, Henning Diedrich <hd2010@eonblast.com> wrote:
> Forked over from Re: Project lead nominations for standard libraries?
>
> On Fri, Dec 31, 2010 at 11:58 PM, Henning Diedrich wrote:
>
> So I plead with you, Roberto, for the soul of Lua, as Chris called out, fix
> # !
>
>
> An implementation. Easiest way to answer critics.
> Ok, I implemented a 'tru count' operator (%) in the core to demonstrate what
> I mean. It returns actual amount of elements in a table, or an approximation
> of characters in a utf-8 char. That may be a stupid idea to mix in, please
> disregard for now.
>
> I chose % but it can be anything of course, just by changing the char in
> line 850 in file src/lparser.c.
>
Henning,
thank you very much for your effort. It is a very useful path, indeed.
Just one question, would your use of %-length operator interfere with
Lua's default meaning of % as a modulus operator. As an alternative I
would suggest '$' character for your length op. On my US-en keyboard $
is next right to #.
It would be great if you could provide your implementation as a
standalone patch.
Mit freundlichen Gruessen,
--Leo--