Comment

Comment by mrkeen

> In Odin all variables are automatically zero initialized. Not just integers and floats. But all structs as well. Their memory is filled with zeroes when those variables are created.

> This makes ZII extra powerful! There is little risk of variables accidentally being uninitialized.

The cure is worse than the problem. I don't want to 'safely' propagate my incorrect value throughout the program.

If we're in the business of making new languages, why not compile-time error for reading memory that hasn't been written? Even a runtime crash would be preferable.

parent mrkeen 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton