this post was submitted on 04 Apr 2024
368 points (96.0% liked)

Programmer Humor

32136 readers
496 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pixelscript@lemmy.ml 7 points 5 months ago (2 children)

it’d be poor style to put more than one statement on a line

Unlike Python, most languages do not endorse a specific concept of style. You're free to dabble in all the bad style choices you like, on the off chance that once in a blue moon they prove to be situationally useful.

[–] CanadaPlus@lemmy.sdf.org 2 points 5 months ago* (last edited 5 months ago)

Why haven't custom parsers become more of a thing? All the compiler or interpreter really needs is a valid parse tree. You could even have some kind of special command or directive to switch styles, if a section would be really ugly otherwise.

[–] toastal@lemmy.ml 1 points 5 months ago

With indentation-based languages the bad coding style we are talking about is putting multiple statements on a line or unindenting a block …& never has that been something I wanted to do. I would rather this aspect be enforced at the language for readability where there is still room in all other aspects to try out other styles.