116 karma · joined Nov 7, 2015 (11y ago) · 110 submissions
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
http://www.theregister.co.uk/2011/09/02/icloud_runs_on_micro...
https://apple.slashdot.org/story/11/09/04/0051209/apples-icl...
comment 8y ago · link · parent
comment 8y ago · link · parent
The stack backup reasoning is lame, "too expensive" is not really defining, and if a stack can be transferred to another stack, having two with one in a strongbox seems logical. You possibly lose memories then, but live on. It seems to come down mostly to money and socioeconomic disparity. At one point someone says, fixing a broken leg is too expensive. That's ridiculous
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
1. If using Int for indexing or any sort of len or count, make sure it's positive when needed, and within bounds of what's allocated. As in if you plan on allocating huge data, plan it out and use the right data type.
2. If you alloc, then free when done. If you free, set to Null; and before you free, check for Null.
3. If you realloc, in particular, check that it actually worked and prepare for basic error handling.
Rust requires all of these steps by default.
Finally, just test some of your code. Rust makes this easy, and encourages it.
I still really like C.
comment 8y ago · link · parent