So you’re saying I can use the semicolon in a different context other than ending an instruction in my Java code ?
Yes, you can end a statement in C or C++ as well.
And, dare I say it, Javascript.
What the fuck? There are children here. Don’t say shit like that.
or begin a comment in Inno
You can ;)
I shit myself; I guess I’m changing my pants.
Great work!
My 2c is that if the majority of people are confused about the purpose of a punctuation mark or language feature in general, then that feature is not actually fulfilling a useful function. If it was actually useful then people wouldn’t be confused, they would just be using it. People would learn it organically and not need it to be explained.
That example sentence would function exactly the same if it was separated by a period, nothing is gained by using a semicolon. No new information is added, you are just going to make people wonder why there is a semicolon there making the sentence less comprehensible.
Its sorta related to the prescriptivism vs descriptivism distinction.
I fully agree with you. However, I like semicolons. They feel very chaotic because nobody knows what they do exactly.
They separate different clauses that don’t necessarily have to be two separate sentences. It can be used in place of a comma where you would follow with but, and, or, nor, for, so and yet.
I have a shirt, but it is itchy.
I have a shirt; it is itchy.
That example sentence would function exactly the same if it was separated by a period; nothing is gained by using a semicolon. No new information is added; you are just going to make people wonder why there is a semicolon there making the sentence less comprehensible.
FTFY. You aren’t supposed to separate two independent clauses with a comma.
I occasionally use semicolons. They can help with parsing; finding a semicolon instead of a period may signify that the next expression is a continuation and expansion of the previous statement.
So you also use a semicolon if you are separating a list and the list includes phrases separated by commas. For example:
My favorite things are lions, tigers, and bears; sugar, spice, and everything nice; and the ol’ red, white, and blue.
I came up with that in thirty seconds so admittedly it’s a bit nonsensical, but there are valid reasons to structure a sentence this way and a semicolon is the only thing helping those independent phrases stay separate and thus help the sentence make sense.
That said, I love semicolons in general; I use them for fun and for variety. They are useful for slightly adjusting the pacing of written communication, since the reader won’t treat them exactly the same as a full stop.
If it was actually useful… People would learn it organically and not need it to be explained.
People don’t learn how to read and write “organically;” you need instruction. Learning how to use punctuation is a part of that instruction. You learned how to use a comma or a period way back in elementary school, you just don’t remember specifically learning it. And a semicolon is a perfectly useful piece of punctuation.
what it’s* for
They can also be used as a super comma; because sometime you make a longer sentence, or a sentence with complex clauses.
I’m sorry, but the example in your comment is nonstandard usage. The part after the semicolon would typically be an independent clause, whereas the “because” marks yours as a dependent clause.
There are still comma-like uses though. The major one I can think of is as a separator in a list where each element is long, possibly containing commas of its own.
It’s more of a weak period than a strong comma; both sides of it need to be complete sentences.
You didn’t quite get it right; adding “because” removes the need for a semicolon. Take out that single word, and your sentence becomes proper.
deleted by creator
“Here is a lesson in creative writing. First rule: Do not use semicolons. They are transvestite hermaphrodites representing absolutely nothing. All they do is show you’ve been to college.”
Kurt Vonnegut
That’s an oddly transphobic/intersexphobic way to express a criticism of semicolons…
“If you want to take my guns away from me, and you’re all for murdering fetuses, and love it when homosexuals marry each other … you’re a liberal. If you are against those perversions and for the rich, you’re a conservative. What could be simpler?”
-Kurt Vonnegut
Yeah it looks like the dude had some issues to say the least…
Rules only take us so far, even good rules.
They are also a great tool to use in place of tabs or spaces to make java developers lose their minds.
works with other c style languages too, can even get rid of the pesky new line debate
As someone who uses them all the time, I don’t understand why people struggle with semicolons; they’re not a difficult concept to comprehend.
em dash supremacy—my friend introduced me to this and i haven’t looked back since.
alt+0151 on PC, ctrl+alt+minus for word if I remember right. On mobile you go to more symbols, hold down the minus, and slide to the longest one.
Both require numeric keypad though- but using a minus and a space after can work as a substitute
--
as well as 2 minus signs (plus Lemmy happens to convert that to an em dash) - but like THAT? treason. absolutely not.You can even join more than 2 independent clauses together as shown above.
On Mac and iPad it’s option-shift-hyphen.
Also there’s the en-dash (option-hypen on Mac/iPad), which is slightly shorter: –
The en-dash is meant for ranges of numbers, e.g., 1990–2023, although some use it like an em-dash.
Ah yes – the em-dash. I will +1 this.
i wish it was a standard on keyboards IMO.
on fr-oss, it’s shift+altgr+4 or 5, i believe… also don’t forget the non-breaking spaces around it when typing french!
What about three, four, or more independent clauses? Is that allowed?
I think so! Go nuts though, rules are for suckers
Hell, I don’t even use semi colon, I go full colon!
I think that second comma should be a semicolon. Also, is that an anal sex joke or am I reading too much into it?
:D
;D
(in standardized English) No, you can’t make them into a star with the semicolon in the center. Sentences are linear, so you can only connect two clauses at a time with one semicolon between them. However, you can chain clauses together, each time using a semicolon to join two independent clauses.
Except language changes over time, so if the star usage of the semicolon catches on and introduces nonlinear sentences, then have at it.
They’re also useful for separating multiple lists when using a comma would make it look like an item is an extended list.
So let’s say I want to express:
"My contacts are:
-
Jessica, Cook (as in a job title, not a name)
-
James, MD (as in the professional certification, not the name ‘MD’)
-
Doug, ABC (maybe to show that Doug works at ABC)"
If I said:
“My contacts are Jessica, Cook, James, MD, Doug, ABC.”
There’s no clear indication of what is a list member and what is a new list. But this:
“My contacts are Jessica, Cook; James, MD; Doug, ABC.”
is a bit clearer. (There are probably better examples but I’m shooting from the hip here lol)
-
DELIMITER //
SELECT name, definition
FROM definitions
WHERE name like ‘;’//
DELIMITER ;
I missed the bus; and that is something I will never ever ever do again
Omit the “and”, and you’ve got it; otherwise, a regular old comma would be the right punctuation there.
If you want to use a colon, you can phrase it “There’s one thing I’ll never do again: Miss the bus.”
Semicolons generally replace a comma + conjunction. So use it instead of the “and” (or “because,” “but,” etc.) and you’re good.
I guess people don’t remember Kris Kross
You people don’t use semicolons; I am very surprised. For real though, I like to use the in German class, as it makes me seem fancy and knowledgeable.
Perchance a semicolon?
Semicolons are my favorite punctuation; I love showing off.