3 ms·
While I wouldn't suggest anyone learn C for the explicit purpose of learning how computers work, being familiar with pointers and memory allocation can go a lon
by mrfredward 8y ago
While I wouldn't suggest anyone learn C for the explicit purpose of learning how computers work, being familiar with pointers and memory allocation can go a long way.
Novice unity programmers struggle to understand why using classes (reference type in c#) in a game loop causes performance issues, but structs (value type in c#) are not as costly. For someone who has called malloc before, this isn't too hard to grasp, but before someone who sticks to garbage collected languages, it seems bizarre and arbitrary.
Of course memory allocation is an OS function, so this isn't "understanding the hardware," but it is a much deeper understanding of computers than not knowing what happens when you create an object.