News for hackers. Stuff that matters.
Re:Choosing a Language Based on Its Syntax? by nice_byte on Thursday February 19, 2026 @01:53PM (#47077541)
I have really just one wish when it comes to syntax: no syntactically significant whitespace. Space, newline, tab, etc. should ALL map to the same exact token. In practice this also means semicolons or something like them are needed as well, to separate expressions/statements. I dislike langs that try to insert semicolons for you, but at least it's better than the alternative.

the way python treats whitespace is a huge design mistake that has probably wasted like a century (if not more) worth of time across all users, on something really trivial.

Re:Choosing a Language Based on Its Syntax? by JamesTRexx on Thursday February 19, 2026 @02:21PM (#47077904)
That's one of the things I like about C, the independence in how one can write code. I was able to develop my own style thanks to that, visualising the structure of the code to distinguish the different parts of statements and make it more clear (at least to myself).

(edited several times to try to correct changes in formatting for an example here, but it's just screwed up :-/ )

Re:Choosing a Language Based on Its Syntax? by liveoneggs on Thursday February 19, 2026 @02:46PM (#47078214)
Re:Choosing a Language Based on Its Syntax? by zzo38computer on Thursday February 19, 2026 @04:47PM (#47079972)
I agree, that I do not like automatic semicolon insertion (in my opinion it is one of the worst features of JavaScript, and possibly the really worst one), and I think it is a good idea that you should use semicolons or whatever to separate expressions and statements (except for a programming language where it is already unambiguous (e.g. because you are required to have brackets around them instead), in which case it is unnecessary).

However, spaces, line breaks, tabs, page breaks, etc are not normally tokens (and should not be tokens), but will separate tokens.

However, that is not the only issue with the syntax, although it is a significant one.

Re:Choosing a Language Based on Its Syntax? by nice_byte on Thursday February 19, 2026 @05:44PM (#47080745)
Yeah I misused the term "token". What I really meant is that they should just be token separator and nothing more (i.e. once we encounter whitespace it means the current token has ended)