79 points

So you’re saying I can use the semicolon in a different context other than ending an instruction in my Java code ?

permalink
report
reply
53 points
*

Yes, you can end a statement in C or C++ as well.

permalink
report
parent
reply
18 points

And, dare I say it, Javascript.

permalink
report
parent
reply
29 points
*

What the fuck? There are children here. Don’t say shit like that.

permalink
report
parent
reply
5 points

or begin a comment in Inno

permalink
report
parent
reply
2 points

What about Applesoft BASIC? Because I was pretty good at that on my Apple II, but I don’t think there were semicolons.

Also, I don’t know how to code, so I don’t know what semicolons are for in code.

permalink
report
parent
reply
3 points

BASIC statements end on new lines. The language does use a semicolon at the end of PRINT statements in order to omit printing a newline character at the end, but I believe that’s the only use. (It’s been about 20 years since I’ve done anything in BASIC.)

The meaning of a semicolon depends completely on the language. C and C-like languages (like Java and Rust) tend to use them to delimit the end of a statement.

permalink
report
parent
reply
20 points

You can ;)

permalink
report
parent
reply
5 points

You can also use them to split lists where the items have commas in them. Like if you’re saying you’re holding a party and you invited A, whom you dislike but would feel bad to exclude; B, who you’ve not seen in years and really want to catch up with; and C, who is also going to be there.

permalink
report
parent
reply
66 points

I shit myself; I guess I’m changing my pants.

permalink
report
reply
21 points

Great work!

permalink
report
parent
reply
2 points

My other pants already have shit in them; I need new pants and should probably see a doctor.

permalink
report
parent
reply
33 points
*

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.

permalink
report
reply
33 points

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.

permalink
report
parent
reply
20 points

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.

permalink
report
parent
reply
18 points

I fully agree with you. However, I like semicolons. They feel very chaotic because nobody knows what they do exactly.

permalink
report
parent
reply

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.

permalink
report
parent
reply
5 points

It’s not some kind of linguistics witchcraft 😬 of course some people know how to use them and some don’t.

I have no idea why comments like yours are prevalent here; imma head out.

permalink
report
parent
reply
4 points
*

OTOH, a lot people are also confused by vowels that sound vaguely similarly.

People get confused pretty easily.

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply
18 points

“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

permalink
report
reply
46 points

That’s an oddly transphobic/intersexphobic way to express a criticism of semicolons…

permalink
report
parent
reply
10 points

“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…

permalink
report
parent
reply
17 points

That’s not his views… that’s from an essay where he’s parodying the mainstream ultrasimplification of political alignment.

https://inthesetimes.com/article/cold-turkey

You left out some language that I think clears up his ironic tone:

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, and want to give them kitchen appliances at their showers, and you’re for the poor, you’re a liberal.

If you are against those perversions and for the rich, you’re a conservative.

What could be simpler?

Totally changes it, doesn’t it?

permalink
report
parent
reply
2 points

To me it felt like they implied going to college is a bad thing. I didn’t expect them to have a shred of metacognition after that.

permalink
report
parent
reply
3 points

He was born in 1922, so that’s not really surprising. Almost no one born that long ago wouldn’t have those bigotries.

I’m not trying excusing it. I’m just not surprised.

permalink
report
parent
reply
3 points

Rules only take us so far, even good rules.

permalink
report
parent
reply
16 points

what it’s* for

permalink
report
reply