• toastal@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    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
      arrow-up
      0
      ·
      7 months ago

      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.

  • Carighan Maconar@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

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