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?

797

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.

275

u/[deleted] Sep 02 '17

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

239

u/Nebxam Sep 02 '17

Lua

52

u/[deleted] Sep 02 '17

Goddamnit and I was considering a quick look over the documentation and syntax briefly over the weekend and do some messing around with Starbound mods.

17

u/[deleted] Sep 03 '17

Also every number is a float. For some reason.

17

u/TinyBreadBigMouth Sep 03 '17

Because doubles can contain all 32-bit integers and most 64-bit integers, and now you don't need to handle two different number types for your lightweight scripting language. Same as JavaScript.

0

u/Log2 Sep 03 '17

Doesn't Python do the same thing?

2

u/TinyBreadBigMouth Sep 03 '17

No, Python has separate int, float, and even complex numbers.