Vitalik Buterin pfp
Vitalik Buterin
@vitalik.eth
"continue" might be the worst-named keyword in python. Like, consider this code: for i in range(100): if i % 5 == 0: continue print(i) It prints out numbers that are not multiples of 5. But if you give it to someone who is not experienced in python, they might think the exact opposite!
48 replies
123 recasts
576 reactions

Mirko 🔵🟡 .⌐◨-◨ pfp
Mirko 🔵🟡 .⌐◨-◨
@netnose
I think break, continue and goto are the biggest code smell ever. I always ask to remove them if possible during reviews!
1 reply
0 recast
3 reactions

xh3b4sd ↑ pfp
xh3b4sd ↑
@xh3b4sd.eth
Agreed on goto. How do you stop a loop if not with break? Do you always want to move loops into their own functions so that they return early on stop? Why is continue bad in your view? It is a typical filter primitive when there is more than one aspect to an algorithm. Which is, fair!?
1 reply
0 recast
1 reaction