Search lua-l
This index contains 143,615 documents and
1,774,615 keywords. Last update on
2023-03-09 .
- 21. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 564)
- Author: Italo Maia <italo.maia@...>
- Date: Sat, 29 Feb 2020 15:41:54 +0100
- correction, this is valid lua: (mktable -p (table, a, b, c, d, e, f, g, ...)).with = value oh well .-.
- 22. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 561)
- Author: Diego Nehab <diego@...>
- Date: Fri, 6 Mar 2020 19:08:29 -0300
- 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: In other words, t[f()] is always a single-index access, even when f
- 23. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 561)
- Author: Francisco Olarte <folarte@...>
- Date: Sun, 1 Mar 2020 19:22:28 +0100
- Anton: No, it does not, it just returns undef: folarte@7of9:~$ perl -e '@x=(1); for(4..6) { print $x[$_]//"x"; } print " $#x $^V\n";' xxx 0 v5.28.1 ( For the uninitiated, this creates a list with a s
- 24. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 560)
- Author: "Soni \"They/Them\" L." <fakedme@...>
- Date: Fri, 28 Feb 2020 22:12:14 -0300
- If I want to access the value of t[a][b][c][d][e] I suggest that it would be more useful -- and more consistent -- if the "Attempt to index a nil value" error is deprecated and, inste
- 25. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 560)
- Author: "Soni \"They/Them\" L." <fakedme@...>
- Date: Fri, 28 Feb 2020 22:10:51 -0300
- If I want to access the value of t[a][b][c][d][e] I suggest that it would be more useful -- and more consistent -- if the "Attempt to index a nil value" error is deprecated and, instead, the indexing
- 26. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 560)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 29 Feb 2020 04:05:19 +0300
- On Sat, Feb 29, 2020 at 12:59 AM Anton Jordaan wrote: If I want to access the value of t[a][b][c][d][e] I suggest that it would be more useful -- and more consistent -- if the "Attempt to index a nil
- 27. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 558)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Mon, 2 Mar 2020 12:57:07 +0300
- On Mon, Mar 2, 2020 at 2:22 AM Sean Conner wrote: local a,a = 1,2 print(a) and it's the second declaration that survives (Lua 5.3). Weirder, in the following:
- 28. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 558)
- Author: Sven Olsen <sven2718@...>
- Date: Sat, 29 Feb 2020 12:35:12 -0800
-
- 29. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 557)
- Author: Diego Nehab <diego@...>
- Date: Sat, 7 Mar 2020 02:34:05 -0300
- We have t(i1, i2, ...) --> getmetatable(t).__call(t, i1, i2, ...) This is always called. We are considering something like t[i1, i2, ...] --> getmetatable(t).__index(t, i1, i2, ...) t[i1, i2, ...] =
- 30. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 557)
- Author: Coda Highland <chighland@...>
- Date: Fri, 6 Mar 2020 21:16:55 -0600
- On Fri, Mar 6, 2020 at 8:01 PM Diego Nehab <diego@impa.br> wrote: I see a couple of competing arguments here. (1) It may be better to treat t[i,j] as being equivalent to t[i] in the absence of __inde
- 31. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 557)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 7 Mar 2020 01:56:29 +0300
- On Sat, Mar 7, 2020 at 1:09 AM Diego Nehab wrote: On Fri, Mar 6, 2020 at 18:19 Egor Skriptunoff wrote: IMO, that would make the whole proposal almost useless. Do you think that accessing a multi-inde
- 32. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 557)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 7 Mar 2020 00:18:37 +0300
- On Fri, Mar 6, 2020 at 6:16 PM Diego Nehab wrote: In other words, t[f()] is always a single-index access, even when f() returns multiple values. IMO, that would make the whole proposal almost useless
- 33. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 555)
- Author: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 2 Mar 2020 11:02:17 -0300
- Note that Lua does not index variables, it indexes values. For instance, in the expression 'f(x).k = 1', if 'f(x)' is nil, there is no variable to get the new table. -- Roberto
- 34. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 552)
- Author: Diego Nehab <diego@...>
- Date: Fri, 6 Mar 2020 23:00:55 -0300
- I see a couple of competing arguments here. (1) It may be better to treat t[i,j] as being equivalent to t[i] in the absence of __index/__newindex. Combined with the above discussion about multi-retur
- 35. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 551)
- Author: Anton Jordaan <anton.jordaan@...>
- Date: Sun, 1 Mar 2020 17:27:45 +0200
- Italo Maio wrote: Perl has auto-vivification and it creates way more problems than it solves. Also agree this should not be part of the language and the error when trying to index a null value is a g
- 36. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 550)
- Author: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sun, 1 Mar 2020 09:42:31 +0300
- On Sat, Feb 29, 2020 at 10:35 PM connor horman wrote: Many of these, excluding ?# don?t have sensible defaults with operator overloading (which we get from metatables). Overloaded operators should re
- 37. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 548)
- Author: Coda Highland <chighland@...>
- Date: Sat, 7 Mar 2020 00:29:56 -0600
- On Fri, Mar 6, 2020 at 11:34 PM Diego Nehab <diego@impa.br> wrote: I do see the potential issue with the way the methods are called. With my suggested behavior, it only comes up if you have mixed ass
- 38. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 548)
- Author: Philippe Verdy <verdyp@...>
- Date: Tue, 3 Mar 2020 15:37:18 +0100
- Le mar. 3 mars 2020 à 12:53, Anton Jordaan <anton.jordaan@sylvean.com> a écrit : This is completely false. The real meaning is in fact much like: local _ref; _ref = t[a]; _ref = _ref[b]; _ref = _ref[
- 39. Re: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 546)
- Author: Coda Highland <chighland@...>
- Date: Sun, 1 Mar 2020 15:27:36 -0600
- Could you elaborate why this is a non-starter? I have seen a number of solutions (including solutions that use metatables to define dynamic arrays, which are useful only when assigning) and also offe
- 40. Re: Suggestion: Deprecate "Attempt to index a nil value" error; instead, return nil or create table (score: 539)
- Author: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 8 Mar 2020 12:44:49 -0300
- "absolutely useless" is very harsh, almost aggressive, without any visible reason. If you cannot see why that would be useful, you can ask (or just ignore the message), but please let us keep a mini
Search by
Namazu v2.0.21