3 ms·
>Everything is just numbers flying around. A number is just a representation. It is really a possibility that is being passed around. 'c', 99, 0x63, these ar
by aaronblohowiak 14y ago
>Everything is just numbers flying around.
A number is just a representation. It is really a possibility that is being passed around. 'c', 99, 0x63, these are all just mappings from the permutation of '01100011'. If you think of it as a "number", then you will be surprised when there is overflow/underflow, or implementation issues with floating points. It is NOT numbers that are flying around, it is just high and low charges. This abstraction is very leaky. If you understand that all of the state of memory in a computer is one very long list of zeroes and ones, then a pointer is a list of zeroes and ones that encodes a location in the list. The reason why teaching pointers, floating point numbers, integer overflows and so forth are confusing to people is that they have been inculcated with abstractions that are wrong. Computation (in hardware and in theory) is one of the few things that can be taught axiomatically and doing so avoids many of the confusions and sticking points that learners encounter.
I do not think people should start with a machine model (necessarily) directly, but they should understand it by the time they are learning pointers.