Remix.run Logo
librasteve a day ago

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

rao-v a day ago | parent | next [-]

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!

xigoi 17 hours ago | parent | next [-]

> You cannot copy or paste anything without busywork

Sounds like a tool issue. My editor (Neovim with a few plugins) can handle copying/pasting with indentation just fine.

eviks 16 hours ago | parent | prev | next [-]

> your IDE or formatter dare not help you

Get the ones that do help you! Problem solved, enjoy your clean reading experience!

silon42 19 hours ago | parent | prev [-]

looks cool..

Alternatively, I've several times used 'pass' as block terminator for my personal code.

jasperry a day ago | parent | prev [-]

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.

hajile a day ago | parent [-]

Lisps aren’t necessarily functional, but don’t need semicolons either.

II2II a day ago | parent | next [-]

The syntax of languages like Lisp and Forth are so fundamentally different that they don't need an explicit statement separator. You don't have to think about many other things either, or I should say you don't have to think about them in the same way. Consider how much simpler the order of operations is in those languages.

wvenable 21 hours ago | parent | prev [-]

Lisp has explicit "statement" terminators (just aren't semicolons)

hajile 13 hours ago | parent [-]

All the lisps I know of have only expressions (no statements).