4 ms·
> I was able to learn C reasonably well as a child precisely because of how straightforward it is. You can reserve a block of memory. You can free it. You can g
by wott 10y ago
> I was able to learn C reasonably well as a child precisely because of how straightforward it is. You can reserve a block of memory. You can free it. You can get the address of a value. You can get the value from an address.
And everything function parameter is passed as value. In many 'advanced' languages, some things are passed by value, other by reference depending on the type, sometimes automatically, sometimes manually, it took me years to figure that out.
Same things for loops.
And I still have nightmares about some languages memory models: what is allocated where? what kind of allocation was performed on the object that this function returned, do I have to free it manually or will it disappear when I leave the scope? which scope? is it on the stack or is it the GC that takes care of it? when does it take care of it? should I call it manually?