[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ 5.4 ] Sequence Iteration - Knowing when to Stop?
- From: "Soni \"They/Them\" L." <fakedme@...>
- Date: Tue, 29 May 2018 19:02:47 -0300
On 2018-05-29 04:15 PM, Dirk Laurie wrote:
What happened when it reached the end of the list?
What end of the list?
2018-05-29 21:06 GMT+02:00 Soni "They/Them" L. <firstname.lastname@example.org>:
On 2018-05-29 03:58 PM, Dirk Laurie wrote:
2018-05-29 20:32 GMT+02:00 Russell Haley <email@example.com>:
On Tue, May 29, 2018 at 9:53 AM, Roberto Ierusalimschy
Just musings, but... I hope they get in, and I hope that
as well as the potential hypothetical `lua_keyvalue` include versions
get integers and fields for number / string arguments directly (as well
their raw version), making for a full suite that allows maximum
and mimics the current Lua C API structure:
We have decided that, at least for 5.4, we are not going on with
the nils-in-table proposal. Although we really like the idea, the
compatibility problems seem too big. As this message evidentiates again,
the language would need a lot of extra stuff (metamethods, API calls,
etc.), even when the option is off.
: - (
That's too bad. The behavior of holes in tables was a huge block for me
when I started using Lua (and is still a pain in the ass IMO). I think
allowing nil in tables removes a hole in the language (pun intended) and
makes tables jmore friendly for newcomers and more practical for using as
sequence. Are we going to have to wait another 4 years for you to tease
with the possibility again?
This is very disappointing news. (To be clear, the news disappoints me,
the people or the language. No flaming necessary).
Nils in tables will be very counterintuitive for people who for
several years have used mainly Lua. (It may be OK for some people
still used to what their previous language did.)
Some years ago, I had this bright idea. Self-initializing tables. The
first time you access tbl[i], the __index metamethod would kick in and
construct the object. Items you never access need never be
Until a table in which I had initialized everything was used in `for
k,v in ipairs(tbl) do`. Work out what happened. It was painful.
It initialized everything, in order, one by one, using a very slow integer
Or was this pre-Lua 5.3?
Disclaimer: these emails may be made public at any given time, with or
without reason. If you don't agree with this, DO NOT REPLY.
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.