4 ms·
You’ll notice that a lot of language allow you more control when dealing with number representations, such as C/C++, Numpy in Python etc. Ex: Since C and C++ n
by balder1991 3y ago
You’ll notice that a lot of language allow you more control when dealing with number representations, such as C/C++, Numpy in Python etc.
Ex: Since C and C++ number sizes depend on processor architecture, C++ has types like int16_t and int32_t to enforce a size regardless of architecture, Python always uses the same side, but Numpy has np.int16 and np.int32, Java also uses the same size but has short for 16-bit and int for 32-bit integers.
It just happens that some higher level languages hide this abstraction from the programmers and often standardize in one default size for integers.