Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

constant_table_comparison

What it does

Checks for direct comparisons with constant tables.

Why this is bad

This will always fail.

Example

if x == { "a", "b", "c" } then

...will never pass.

if x == {} then

...should be written as...

if next(x) == nil then