What’s the difference between an integer and a pointer?

In an assembly language we typically don’t have to worry very much about the distinction between pointers and integers. Some instructions happen to generate addresses whereas others behave arithmetically, but underneath there’s a single data type: bitvectors. At the opposite end of the PL spectrum, a high-level language won’t offer opportunities for pointer/integer confusion because the abstractions are completely firewalled off from each other. Also, of course, a high-level language may choose not to expose anything that resembles a pointer.

3 Comments

  1. 2018-09-25 3:06 pm
    • 2018-09-25 6:57 pm
  2. 2018-09-26 10:47 am