I've recorded the compiler podcast for http://handmade-seattle.com and boy do @andy_kelley and @TheGingerBill DELIVER. Here's a fascinating (and edited) excerpt on default values
#programming #gamedevpic.twitter.com/VoaC8yM3zS
-
-
ZII cannot be used with all data types. As a simple example consider a pointer which is never supposed to be null - which is many if not most pointers. Zero initializing such a pointer gives it the wrong value.
-
I always initialise pointers so that they start their life pointing at zero, the mythical homeland of memory addresses. At least you get crashes when you try to dereference zero address, instead of very subtle bugs if you dereference a random valid address. So zero less wrong?
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.