3 ms·
That first example is deceptive. In this line: for i := 0; i <= n; i++ { The "<=" character just looks like a "<" character due to the typeface that the a
by throwawaylala1 5y ago
That first example is deceptive. In this line:
for i := 0; i <= n; i++ {
The "<=" character just looks like a "<" character due to the typeface that the author chose. I'm going to assume that wasn't an accident because it perfectly masks the obvious bug in the for loop.
When I did a quick scan of that code it looked good to me. Then he claimed it should panic and I felt crazy. So I copy/pasted the code into an editor to see wtf was going on and sure enough it was "<=".
- Andoryuuta 5y agoThis is my main issue with fonts made for programming that use special ligature marks. They _look_ cool, but they are very hard to tell apart from other characters. It's like someone decided that the I, l, 1 confusion wasn't enough and decided to add more. :P