logoalt Hacker News

librasteveyesterday at 10:08 PM2 repliesview on HN

This article makes a strong case for every language to use ‘;’ as a statement separator.


Replies

rao-vtoday at 12:19 AM

Exactly. I genuinely do not understand how any significant user of python can handle white space delimitation. You cannot copy or paste anything without busywork, your IDE or formatter dare not help you till you resolve the ambiguity.

One day https://github.com/mathialo/bython one day!

show 1 reply
jasperryyesterday at 11:34 PM

Indeed it does, by showing how many different and confusing types of parsing rules are used in languages that don't have statement terminators. Needing a parser clever enough to interpret essentially a 2-d code format seems like unnecessary complexity to me, because at its core a programming language is supposed to be a formal, unambiguous notation. Not that I'm against readability; I think having an unambiguous terminating mark makes it easier for humans to read as well. If you want to make a compiler smart enough to help by reading the indentation, that's fine, but don't require it as part of the notation.

Non-statement-based (functional) languages can be excepted, but I still think those are harder to read than statement-based languages.

show 1 reply