3 ms·
Thank you. Having done a limited amount of assembly programming, 0-indexed arrays seem incredibly obvious, since they allow you to simply add the word size time
by abvdasker 13y ago
Thank you. Having done a limited amount of assembly programming, 0-indexed arrays seem incredibly obvious, since they allow you to simply add the word size times the index to get the memory address of any entry in an indexed data structure. This is still almost exactly how arrays work in most (compiled) languages.
Personally, I think it's cool that there are elements of mid/high-level programming languages which still reflect very low-level operational concepts.
- mtdewcmu 13y agoThe reason they seem obvious is that they represent a quantity that has meaning -- the offset.