Get the latest tech news

The Unreasonable Effectiveness of Naming Integers


Devlog This page contains a curated list of recent changes to main branch Zig. Also available as an RSS feed.

It's uncanny how effective it is to avoid bugs by simply naming integers and thereby giving Zig's type system a chance to catch mistakes. It's extremely annoying and time consuming to troubleshoot this kind of mistake at runtime, but it's trivial to solve when you get a compile error from a type mismatch. I knocked out#20599 on a plane ride last week (coincidentally on the way to a KQ tournament), so if you're tracking master branch, you can now use the zig build --watch feature on macOS, FreeBSD, OpenBSD, NetBSD, DragonFlyBSD, and Haiku.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of naming integers

naming integers