Folks acting like Python is the only language without semicolons. 😏

I got tripped up so many time in the last 3 weeks using PHP after years in ML family languages. I am already newlining & it’d be poor style to put more than one statement on a line so what is the point of these semicolons?

@pixelscript@lemmy.ml
link
fedilink
English
26M

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.

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.

For bonus points take their code and completely go wild with utterly random indentation and line breaks, just to drive the point home. 😈

Pfff just randomly replace tabs with 4 spaces and see the world burn

@cybervseas@lemmy.world
link
fedilink
English
66M

How does one manually add a semicolon? vs. automatically?

LazaroFilm
link
fedilink
English
26M

I have a plugin in VSCode to remind me not to forget the semicolons

That’s actually me removing semicolons from Python.

Create a post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 4 users / day
  • 8 users / week
  • 108 users / month
  • 558 users / 6 months
  • 1 subscriber
  • 899 Posts
  • 3.11K Comments
  • Modlog