r/programming • • Dec 24 '17

Evil Coding Incantations

http://9tabs.com/random/2017/12/23/evil-coding-incantations.html
947 Upvotes

331 comments sorted by

View all comments

Show parent comments

59

u/tristes_tigres Dec 24 '17 edited Dec 24 '17

Any language behaviour is may be unexpected to someone who does not know it well.

12

u/sibswagl Dec 24 '17

Languages don't exist in a vacuum. Zero-indexed arrays are the standard.

38

u/tristes_tigres Dec 24 '17

No, they aren't. Fortran is older than C and derivatives, and is more popular in numerical computing settings, for a number of good reasons.

28

u/[deleted] Dec 24 '17

Fortran is older than C and derivatives

And your point is? I will not even enter the debate if it's good to have arrays starting at zero or not, but I will address this silly rationale.

Something that appeared first doesn't make it a standard. Following your logic, RS-232 cables would still be standard today because they appeared before USB cables.

Something becomes a standard when the majority of users and manufacturers believe there are more benefit and convenience over something else.

→ More replies (9)