Search lua-l
This index contains 143,604 documents and
1,774,497 keywords. Last update on
2023-03-08 .
- 1. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 643)
- Author: Coda Highland <chighland@...>
- Date: Fri, 28 Feb 2020 17:10:03 -0600
- On Fri, Feb 28, 2020 at 3:59 PM Anton Jordaan <anton.jordaan@sylvean.com> wrote: Lua is memory efficient for huge but sparse multi-dimensional arrays, since nil values aren't stored in the tables. Ho
- 2. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 635)
- Author: Dennis Fischer <darkwiiplayer@...>
- Date: Sun, 1 Mar 2020 11:39:21 +0000
- Wouldn't it be enough to write a function to do this type-checking for you instead of having the language *always* do it? ? Doing this would make debugging harder, as error messages wouldn't tell you
- 3. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 626)
- Author: Sam Putman <atmanistan@...>
- Date: Tue, 3 Mar 2020 18:56:48 -1000
- On Fri, Feb 28, 2020 at 11:59 AM Anton Jordaan <anton.jordaan@sylvean.com> wrote: Lua is memory efficient for huge but sparse multi-dimensional arrays, since nil values aren't stored in the tables. H
- 4. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 624)
- Author: Philippe Verdy <verdyp@...>
- Date: Sat, 29 Feb 2020 19:24:36 +0100
- Hmmm.. yes, but still "or nil" is not needed. For such situation, where you expect a function to return a value or an exception to catch in order to use an alternate (nil) value, I'd use a utility fu
- 5. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 618)
- Author: Sam Putman <atmanistan@...>
- Date: Tue, 3 Mar 2020 19:07:17 -1000
- On Tue, Mar 3, 2020 at 6:56 PM Sam Putman <atmanistan@gmail.com> wrote: On Fri, Feb 28, 2020 at 11:59 AM Anton Jordaan <anton.jordaan@sylvean.com> wrote: Lua is memory efficient for huge but sparse m
- 6. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 618)
- Author: connor horman <chorman64@...>
- Date: Sat, 29 Feb 2020 13:25:35 -0500
- actually it'll be the string "attempt to index a nil value"
- 7. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 617)
- Author: nobody <nobody+lua-list@...>
- Date: Sun, 1 Mar 2020 23:04:33 +0100
- On 01/03/2020 16.46, Philippe Verdy wrote: Or may be there's a need to subclass the "nil" value: reading an unassigned position in a table with this property could return this special "niltable" valu
- 8. Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 612)
- Author: Anton Jordaan <anton.jordaan@...>
- Date: Fri, 28 Feb 2020 23:59:20 +0200
- Lua is memory efficient for huge but sparse multi-dimensional arrays, since nil values aren't stored in the tables. However, reading and writing to such sparse multi-dimensional arrays can be quite a
- 9. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 610)
- Author: "Soni \"They/Them\" L." <fakedme@...>
- Date: Sat, 29 Feb 2020 15:06:52 -0300
- _, v = pcall(function() return t[a][b][c][d][e] end) i.e. discard (_) the false/true status in the 1st return value of the pcall, use the second value which is explicitly returned and will be nil if
- 10. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 609)
- Author: Anton Jordaan <anton.jordaan@...>
- Date: Tue, 3 Mar 2020 13:52:23 +0200
- Sean Conner wrote: Here are some of the issues that need to be addressed for this to work. 1) t[a] = v This is syntactic sugar for t = { [a] = v }. Then does that mean: local t[a] = v is legal Yes, l
- 11. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 598)
- Author: Philippe Verdy <verdyp@...>
- Date: Sat, 29 Feb 2020 17:56:18 +0100
- I see no value at all in adding "or nil" (except that you'll change a "false" stored value, returned without exception, into an "nil"). Then why do you need "and t[a][b][c][d][e]" ? Wouldn' this be e
- 12. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 587)
- Author: Philippe Verdy <verdyp@...>
- Date: Fri, 6 Mar 2020 18:51:45 +0100
- You reeate here exactly the idea I posted last week in this same thread (I spoke about the multikey function car can be used to map a set of keys into a single one, usiable as the main index of a sin
- 13. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 587)
- Author: "Soni \"They/Them\" L." <fakedme@...>
- Date: Sat, 29 Feb 2020 13:42:41 -0300
- the error when trying to index a null value is a good thing. Let's assume the statement v = t[a][b][c][d][e] Each of 5 indexing steps might result in nil. Sometimes you want to raise "Attempt to inde
- 14. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 586)
- Author: Philippe Verdy <verdyp@...>
- Date: Sun, 1 Mar 2020 16:46:04 +0100
- If such behavior is added, it should depend on a table's meta-property, i.e. a special value in its metatable. Autocreation can also create problems in Lua. Or may be there's a need to subclass the "
- 15. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 584)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 29 Feb 2020 19:31:01 +0300
- On Sat, Feb 29, 2020 at 5:42 PM Italo Maia wrote: the error when trying to index a null value is a good thing. Let's assume the statement v = t[a][b][c][d][e] Each of 5 indexing steps might result in
- 16. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 583)
- Author: Diego Nehab <diego@...>
- Date: Fri, 6 Mar 2020 12:16:03 -0300
- A while back Luiz Henrique and I brainstormed potential support for multi-index tables in Lua. The motivation was the binding multi-index C structures to Lua. Here is a summary of our conversation. C
- 17. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 580)
- Author: connor horman <chorman64@...>
- Date: Sat, 29 Feb 2020 14:35:17 -0500
- On Sat, Feb 29, 2020 at 14:29 Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote: On Sat, Feb 29, 2020 at 9:26 PM connor horman wrote: I?ve used some strongly typed languages that have a ?try operat
- 18. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 579)
- Author: Sean Conner <sean@...>
- Date: Sun, 1 Mar 2020 18:21:57 -0500
- It was thus said that the Great Anton Jordaan once stated: Let's assume for a second this exists. Here are some of the issues that need to be addressed for this to work. 1) t[a] = v This is syntactic
- 19. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 576)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 29 Feb 2020 22:29:17 +0300
- On Sat, Feb 29, 2020 at 9:26 PM connor horman wrote: I?ve used some strongly typed languages that have a ?try operator?. t?[a]?[b]?[c]?[d]?[e] would be equivalent to t[a][b][c][d][e], but if any eval
- 20. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 574)
- Author: Coda Highland <chighland@...>
- Date: Fri, 6 Mar 2020 16:44:55 -0600
- On Fri, Mar 6, 2020 at 4:09 PM Diego Nehab <diego@impa.br> wrote: On Fri, Mar 6, 2020 at 18:19 Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote: On Fri, Mar 6, 2020 at 6:16 PM Diego Nehab wrote: I
Search by
Namazu v2.0.21