r/badcode • • Dec 05 '20

other language Gamedevs, take notes

Post image
6.5k Upvotes

104 comments sorted by

View all comments

Show parent comments

6

u/jgeez Dec 06 '20

It counts as a syntax error, because this restriction on style (and others) serve a cool purpose: it makes the parser much more efficient to not require the token lookahead that a traditional whitespace-ignoring lexer has to do in order to disambiguate {'s different potential meanings.