Pointer

Noun · Development

Definitions

  1. Pointer is a variable that stores the memory address of another value rather than the value itself. Pointers are central to systems programming in C and C++, enabling direct memory manipulation, dynamic memory allocation, efficient data structures like linked lists and trees, and passing large data without copying. Dereferencing a pointer accesses the value at the stored address, while pointer arithmetic allows traversing contiguous memory. Misuse of pointers causes some of the most notorious bugs in software: null pointer dereferences, dangling pointers (pointing to freed memory), buffer overflows, and memory leaks. Modern languages like Rust have reimagined pointers through ownership and borrowing rules that prevent these errors at compile time. Java and Python hide pointers behind references, managing memory automatically through garbage collection. Understanding pointers remains essential for low-level programming, embedded systems, and performance-critical applications.

    In plain English: A variable that does not hold data directly but instead holds the address where the data lives in memory — like a sticky note that says 'the file is in drawer 3.'

    Example: "Dereferencing a null pointer: the fastest way to crash a C program and question your career choices."

Etymology

1964
Harold Lawson invents the pointer for the PL/I language, enabling indirect memory access in high-level code.
1972
C adopts pointers as a core feature, giving programmers direct control over memory addresses.
1990s
Pointer bugs (null dereference, buffer overflows) become the leading cause of security vulnerabilities in C/C++ code.
2010s
Rust introduces ownership and borrowing to provide pointer-like control without the safety pitfalls. 'Pointer safety' becomes a language design priority.

Origin Story

The Variable That Points Somewhere Else

A pointer is a variable that stores the memory address of another variable rather than a value itself. The concept is fundamental to systems programming and dates back to the earliest days of computing, when programmers worked directly with memory addresses. Harold Lawson is widely credited with introducing pointers to high-level programming languages. In 1964, while working at IBM, Lawson designed the pointer facility for PL/I, one of the first high-level languages to give programmers explicit control over memory addresses. Before this, assembly language programmers routinely manipulated addresses, but high-level languages had shielded users from such details. Dennis Ritchie's C language, developed at Bell Labs in the early 1970s, made pointers a central feature. C pointers could be incremented, decremented, and used in arithmetic, giving programmers extraordinary power and equally extraordinary opportunity to create bugs. Buffer overflows, dangling pointers, and null pointer dereferences became some of the most common and dangerous classes of software defects. Tony Hoare, who introduced the null reference in 1965, later called it his 'billion-dollar mistake.' Modern languages like Rust have reimagined pointers through ownership and borrowing systems that prevent common pointer errors at compile time, while languages like Java and Python hide pointers behind references entirely.

Coined by: Harold Lawson (in high-level languages)

Context: IBM PL/I language design, 1964

Fun fact: Harold Lawson received the IEEE Computer Pioneer Award in 2000 specifically for his invention of the pointer variable concept in higher-level languages.

Related Terms