Skip to main content

One post tagged with "Arrays"

Posts about arrays, indexing, and data structures.

View All Tags

C Chose the Wrong Origin: Why 1-Based Indexing Is Better Language Design

· 14 min read

The first element is the first element, not the zeroth element.

For decades, we have been told by systems programmers that counting from zero is "closer to the metal," "mathematically purer," and the definitive mark of a "real programmer." Languages that use 1-based indexing—like Julia, R, MATLAB, and Fortran—are often patronized as quirky tools for mathematicians who just "don't understand computer science."

I call bullshit.