You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Computers count from zero; people count from one. Zero-based indexing can be confusing for non-developers and programming novices. Humans generally find one-based indexing more intuitive, where in the list (1 2 3) the first item is found in position one rather than at index zero.
Discussing the intent of Clarity contracts with non-programmers will benefit from one-based indexing.
Choosing between zero-based and one-based indexing is a programming language design decision. Programmers should be able to adapt to either. While many programming languages, and close to the metal systems languages in particular, typically uses zero-based indexing, major programming languages used for mathematics have one-based indexing, including Mathematica, Matlab, and R. Other languges with one-based indexing includes Julia, Lua, Erlang, Smalltalk, Many high-level domain-specific languages also use one-based indexing.
The text was updated successfully, but these errors were encountered:
Computers count from zero; people count from one. Zero-based indexing can be confusing for non-developers and programming novices. Humans generally find one-based indexing more intuitive, where in the list
(1 2 3)
the first item is found in position one rather than at index zero.Discussing the intent of Clarity contracts with non-programmers will benefit from one-based indexing.
Choosing between zero-based and one-based indexing is a programming language design decision. Programmers should be able to adapt to either. While many programming languages, and close to the metal systems languages in particular, typically uses zero-based indexing, major programming languages used for mathematics have one-based indexing, including Mathematica, Matlab, and R. Other languges with one-based indexing includes Julia, Lua, Erlang, Smalltalk, Many high-level domain-specific languages also use one-based indexing.
The text was updated successfully, but these errors were encountered: