What’s your opinion on prorgamming languages that separate lines with semicolons or those that just use a line break?

  • wraptile
    link
    fedilink
    arrow-up
    3
    ·
    5 years ago

    I feel the same way. Good code is newline formatter anyway so semicolons tend to be completely reundandant. I like how python has optional support for them though as often I end up in python shell and need a one liner like import foo;foo.do_something()

    • AgreeableLandscapeOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      5 years ago

      Except Python is still whitespace sensitive with semicolons, so in an indented block you have to do something like function1(); function2(). In the terminal it works fine though.

      Honestly, I wish they did what Ruby did and just used the end keyword.

      • wraptile
        link
        fedilink
        arrow-up
        3
        ·
        5 years ago

        Personally I hate end keywords - seems like a such an antipattern. I’ve been using jinja html templating language for most web stuff and the end keywords caused so much headache in my career and are really ugly.

    • Decibel
      link
      fedilink
      arrow-up
      1
      ·
      5 years ago

      How do you handle long variable names?
      e.g. If (super…long…name1 && super…long…name2) vs. If (super…Long…Name1 && super…long…Name2)