4 ms·
I think it's one of those features where the original intended audience of the programming language are supposed to be non-programmers (or presumably, 1-based i
by mahmoudimus 2y ago
I think it's one of those features where the original intended audience of the programming language are supposed to be non-programmers (or presumably, 1-based indexing is intuitive?) but for seasoned programmers who have been used to 0-based indexing, the change is quite stark.
It's the same concept with AutoHotKey and the original intention of Lua (super small user-defined script for the masses).
Whereas Fortran and Ada probably had some forethought that went into enabling that functionality. I will have to check but I remember my algorithm class started with 1-based indexing and the reason was it was intuitive to explain. But when experienced with C/C-inspired languages, the old adage becomes relevant: "There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."
- sudahtigabulan 2y ago> the original intention of Lua (super small user-defined script for the masses). Lua was originally intended to be a language/data format for a Brazilian oil company geology software. https://www.lua.org/history.html https://www.lua.org/history.html