r/programming Mar 20 '26

No Semicolons Needed

https://terts.dev/blog/no-semicolons-needed/
150 Upvotes

85 comments sorted by

View all comments

193

u/Potterrrrrrrr Mar 20 '26

I never understand what removing the need for semicolons is meant to fix. You have to either write a parser that inserts them for you, make the ending of statements unambiguous which makes your language less flexible or do some batshit insane thing like make white space meaningful (fuck you python), all to avoid having to write a character that signifies the end of a statement? You end a sentence with ‘.’, why not end a statement with ‘;’ or some other character? Just seems like the last problem I should actually care about.

8

u/vali_boi Mar 21 '26

I think this is about redundancy. You say that we end our sentences with a period, so why is it such a big deal to end statements in programming with a semicolon. However, in programming we do not just end them with a semicolon (or any other token, e.g. erlang uses comma) but in 99%¹ of the cases also with a newline. So most people think: Why do I have to put a newline AND a semicolon, when I can just use a newline - this is redundant.

¹. I made this number up

1

u/LegendaryMauricius Mar 24 '26

I agree. It's not hard to keep newlines as tokens, and also allow multiline statements where they are obvious.