Hacker News new | ask | show | jobs
by cmoski 16 days ago
for i in 1 ... 5 { sum = sum + i }

Means "for 1 to 4". Kill me now.

1 comments

if the language specifies all ranges to be the same this matters very little.

if a ranges are inclusive, you get used to it. if it is arbitrary it is awful.