← Back to context

Comment by srhtftw

1 year ago

> locals can no longer be used before declaration

There's a lot I like about Lua but it so happens that a few days ago I spent longer than I'd like to admit debugging a trivial typo for Advent of Code day 5 that would have been caught by this.

Wondering if Luon will also prohibit or at least warn about storing nil in a table.

Luon doesn't directly support tables, but instead supports records, arrays and hashmaps (which internally use tables). Since it's statically typed you can only store nil to a field or element if it is of a structured type.