Re: Confusing error message for nil-indexed C arrays

  • From: demetri <demetri.spanos@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 3 Aug 2012 14:42:03 -0700

> Well, the error is generic. What if you index an array with e.g.
> 'true' or a table as a key?

FWIW when I first started playing with the FFI I had the same
head-scratching reaction; what could it mean that an array can't be

It only takes a moment to realize that it means a non-numeric index, but it
may be slightly more communicative (and slightly more technically correct)
to say "int [?] can only be indexed by a numerical offset".

Just my $0.02

Other related posts: