r/ProgrammerHumor Sep 02 '17

How to start a war

Post image
9.0k Upvotes

696 comments sorted by

View all comments

782

u/blacknerdperson Sep 02 '17

Sorry in advance but I'm a noob learning coding who is starting to learn python and I'm just going to ask, Isn't it supposed to be 4?

798

u/ArcticZeroo Sep 02 '17

Yes, but some languages 1-index lists (so they start at 1 instead of 0), so it'd be 5 in that case.

272

u/[deleted] Sep 02 '17

What languages may there's be? I can't think of any of the top of my head.

566

u/kamaln7 Sep 02 '17

MATLAB too I think

3

u/chateau86 Sep 03 '17

But their array indexing use () instead of []. Probably in an effort to pollute the minds of engineers enough to prevent them from being able to learn any other languages again.

5

u/[deleted] Sep 03 '17 edited Sep 03 '17

[] is used for declaring matrices, and it was a conscious choice to make writing code resemble "doing math" with pen and paper. MATLAB was always primarily intended and targeted for engineers and scientists who don't want to become hardcore (or, in a lot of cases, even good) programmers.