odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.89k stars 606 forks source link

Remove nil checks. #3882

Closed Kelimion closed 4 months ago

Kelimion commented 4 months ago

The caller should really not pass foo: ^string = nil. A for ch, in foo would also crash, so let's not introduce new semantics for iteration.

A caller shouldn't pass garbage if they can help it, and a nil ^string is not a useful ZII usage here.