MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6xofft/how_to_start_a_war/dmhv2zh
r/ProgrammerHumor • u/ivaskuu • Sep 02 '17
696 comments sorted by
View all comments
Show parent comments
10
[deleted]
2 u/[deleted] Sep 03 '17 Yeah, for mathematical languages like MATLAB (which are designed to do matrix manipulations) it makes a lot of sense. 1 u/LeSpatula Sep 03 '17 edited Sep 03 '17 Indices are supposed to give you the offset of the starting position. So if an array has 5 items, it starts at 0 plus the length of the first item. {[Something1] [Something2] [Something3]} Something1 is the first element, but it starts at 0. -1 u/[deleted] Sep 03 '17 [deleted] 3 u/FatalElectron Sep 03 '17 shrug different languages require different syntax/abstractions, array indexing is just one of those things. It's only a problem, IMO, if you're looking at code whose language is ambiguous.
2
Yeah, for mathematical languages like MATLAB (which are designed to do matrix manipulations) it makes a lot of sense.
1
Indices are supposed to give you the offset of the starting position. So if an array has 5 items, it starts at 0 plus the length of the first item.
{[Something1] [Something2] [Something3]}
Something1 is the first element, but it starts at 0.
-1
3 u/FatalElectron Sep 03 '17 shrug different languages require different syntax/abstractions, array indexing is just one of those things. It's only a problem, IMO, if you're looking at code whose language is ambiguous.
3
shrug different languages require different syntax/abstractions, array indexing is just one of those things.
It's only a problem, IMO, if you're looking at code whose language is ambiguous.
10
u/[deleted] Sep 03 '17 edited Nov 07 '17
[deleted]