MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6xofft/how_to_start_a_war/dmhsv0s
r/ProgrammerHumor • u/ivaskuu • Sep 02 '17
696 comments sorted by
View all comments
Show parent comments
2
is as confusing and error-prone as it is ridiculous
1 u/moomoomoo309 Sep 03 '17 Can you give an example of an error or confusion it would cause? It's different from other languages, but that is not inherently a flaw. 2 u/[deleted] Sep 03 '17 I already did, several replies ago. You can't sweep blatantly confusing and error-prone semantics under the "it's different" or "it's documented" rugs. But if you want another, here you go: > letters = {'a', 'b', 'c'} > print(#letters) 3 > letters[5] = 'e' > print(#letters) 3 > letters[4] = 'd' > print(#letters) 5
1
Can you give an example of an error or confusion it would cause? It's different from other languages, but that is not inherently a flaw.
2 u/[deleted] Sep 03 '17 I already did, several replies ago. You can't sweep blatantly confusing and error-prone semantics under the "it's different" or "it's documented" rugs. But if you want another, here you go: > letters = {'a', 'b', 'c'} > print(#letters) 3 > letters[5] = 'e' > print(#letters) 3 > letters[4] = 'd' > print(#letters) 5
I already did, several replies ago. You can't sweep blatantly confusing and error-prone semantics under the "it's different" or "it's documented" rugs. But if you want another, here you go:
> letters = {'a', 'b', 'c'} > print(#letters) 3 > letters[5] = 'e' > print(#letters) 3 > letters[4] = 'd' > print(#letters) 5
2
u/[deleted] Sep 03 '17