Skip to content

Comment on Strangest Programming Language Feature?

Comments

Fun fact, this is also the reason why 'i' is commonly used as a name for the loop counter variable.

No, it's the other way around; i, j, ... have a long history in mathematics as indices for matrices, summations, etc., with m, n likewise being traditional for the dimensions of a matrix.

In early FORTRAN, integers were present primarily to be used as array subscripts. The INteger mnemonic doesn't appear in any of the early papers or manuals.

As a side note, on the topic of features that would currently seem ‘strange’, some early languages that were intended to be programmed using teletypewriters rather than FORTRAN's Hollerith cards used half-line motions to write array subscripts as actual subscripts.

What about as an abbreviation for "index"?

Source?

I mean google around. It's not "it's definitely from Fortran" more like "it has been repeatedly suggested that...".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.