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

  • @nutomicA
    link
    5
    edit-2
    4 years ago

    This makes such little difference that I dont care about it at all. There are so many more important factors when picking a language.

  • @doomy
    link
    54 years ago

    I like languages where they are not required but can be used to delimit two statements on one line. I also like Rust in that no semicolon is an implicit return

    • DessalinesA
      link
      24 years ago

      Same, I like that implicit return too, I think some other languages have that too.

    • Richard
      link
      24 years ago

      Which is highly confusing when you are learning Rust but come from Javascript.

  • @AgreeableLandscapeOP
    link
    4
    edit-2
    4 years ago

    Personally, I’m not a fan of semicolons and prefer if languages just used line breaks. It’s one of the reasons I like Kotlin over Java.

    My biggest issue with semicolons is that they don’t convey any actual information and forgetting them is annoying.

    • @wraptile
      link
      34 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
        2
        edit-2
        4 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
          34 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
        14 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)

  • @jaex5Fox
    link
    2
    edit-2
    4 years ago

    deleted by creator

  • @blamitter
    link
    24 years ago

    I love typos like while(true);

    • @AgreeableLandscapeOP
      link
      24 years ago

      I feel like that shouldn’t even be allowed. Like what’s the point?

      • @blamitter
        link
        34 years ago

        I’d say it wasn’t intended but accidental since it is possible to avoid brackets for one-line blocks in while. One could argue that the bug is in the language specs! Another could say it’s not a bug but a feature for some bizarre use. Well…