• RacerX@lemm.ee
    link
    fedilink
    arrow-up
    20
    ·
    13 hours ago

    I was taught it in school, have looked it up on Wikipedia, seen infographics, YouTube videos, etc., and yet I still do not know when to use those things. At this point I just refuse to purely out of fear.

    • I have one easy rule, and two examples. Use them when using a comma would be confusing.

      Examples: often in lists, where each item might contain a comma and so trying to separate list items with commas would just be confusing; and more broadly anywhere where you have a sentance containing clauses and need a different separator.

      I just used the first example above: to separate the two list items, and the other one I’m using here, where I’m already using commas; using a semicolon allows braking this up without starting a new sentance.

      That second example was somewhat contrived, but does the job; it could have been two sentences.

      Actually, there’s another place I use them, but it’s not a “rule” and if more style: I use them selectively in place of periods to prevent a series of short, choppy sentences.

      • Landless2029@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        9 hours ago

        I’ve always done this one:

        • Between closely related [independent clauses].

        • (https://en.m.wikipedia.org/wiki/Independent_clause “Independent clause”) not conjoined with a coordinating conjunction, when the two clauses are balanced, opposed or contradictory:[23].

          • My wife said she would like tea; coffee would have been my choice.
          • I went to the basketball court; it was closed for cleaning.
          • I told Kate she’s running for the hills; she knew I was joking.
        • argon@lemmy.today
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          8 hours ago

          Basically you use them at points where you’d usually put a period, but you don’t want to add as much of a pause.

          ETA:

          For example

          My wife said she would like tea; coffee would have been my choice.

          could also be written as

          My wife said she would like tea. Coffee would have been my choice.

          but it wouldn’t sound as nice.

    • stupidcasey@lemmy.world
      link
      fedilink
      arrow-up
      18
      ·
      13 hours ago

      You generally use them at the end of a line but it is more accurate to say you use them at the end of a statement but we usually put each statement on a single line so it is easy to make that mistake example:

      Tap for spoiler
      <?php
      $x = 5; // Semicolon ends the statement
      $y = 10; // Another statement ends here
      
      if ($x < $y) { // No semicolon needed here
          echo "x is less than y"; // Semicolon ends this statement
      }
      
      $x = $x + $y; // Statement ends here
      echo $x; // Outputs 15
      ?>
      
    • Serinus@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      12 hours ago

      I use them after worrying about being pretentious, but then (sometimes) deciding “fuck it. It’s right.” and then doing it anyway.

  • SwingingTheLamp
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    1
    ·
    15 hours ago

    Since this is about punctuation, what’s with the double dashes? Trailing off is usually written with an ellipsis, though an em dash can be used, since this is more of a break in speech. And yes, double dashes are sometimes used as a substitute on a keyboard or with a typeface that doesn’t have an em dash.

    But this is hand-lettered text— just draw the em dash!

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      edit-2
      14 hours ago

      An em dash is done with a triple hyphen in some programs like Microsoft Word, IIRC, and a double hyphen is an en dash.

      But I am lazy and don’t want to smack hyphen three times, so I tend to use double hyphen for em dash, which I use a lot more than en dash, and just use a single hyphen for en dash. People get the meaning.