On Thu, Dec 24, 2020 at 3:12 PM Arnaud Delobelle <arno...@gmail.com> wrote: > That's interesting, thanks. Although I don't think it fits my use case > because I need something stronger than an iterator: a function that given a > table and a key returns the next key in the table (as this is a public API > that Lua provides, see https://www.lua.org/manual/5.3/manual.html#pdf-next). > From my point of view this is an unfortunate API! Nevertheless it is what it > is... I haven't found even a hacky way to obtain that for a Go map. That is > why I think I need to make my own hashtable implementation
The linked pdf seems to indicate that Lua's 'next' can be implemented using Go range over a map with no problem because the iteration order is undefined in Lua as well. What am I missing? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-UVtQH2zgaMG0F-MUvkmSO83d8yX9bpZQgJrpV%2BfnOGew%40mail.gmail.com.