Inside of you are two wolves:

One of them wants to be grammatically correct and put the punctuation inside "the quoted text."

The other one has been programming for 25 years and is howling at the top of its lungs, "I demand proper nesting!".

@andrewrk solution: never learn grammar /s
@andrewrk As somebody who has drifted into electrical engineering somehow, let me introduce you to Toshiba part numbers: https://www.digikey.com/en/products/detail/toshiba-semiconductor-and-storage/TLP291-GB-TP-SE/4562874
TLP291(GB-TP,SE | DigiKey Electronics

Order today, ships today. TLP291(GB-TP,SE – Optoisolator Transistor Output 3750Vrms 1 Channel 4-SO from Toshiba Semiconductor and Storage. Pricing and Availability on millions of electronic components from Digi-Key Electronics.

DigiKey Electronics

@23n27

😱

you're kidding me

@andrewrk I'm afraid not. Though I would really like to know the story behind those.
@andrewrk in response, i would say "i have only one of those wolves.".

@andrewrk At this point the first wolf has moved on.

But in any case, punctuation isn't part of grammar, so it's not going to affect grammatical correctness.

How did thou come to that conclusion, @typeswitch? Punctuation is as important as words (or identifiers) to deliver meaning, whether it's a formal or natural language. There are cases like the example given by @andrewrk where there is more than one way to express the same thing without ambiguity, but in general, misuse of punctuation is gonna give Godzilla a stronk.

@cnx Grammar is about spoken language, it's about how words come together to create sentences with meaning.

Punctuation is part of writing, not spoken language. It's like spelling, which is also not grammar & only applies to written language. It's a set of conventions for how to record and transmit aspects of the spoken language using symbols.

It's good to recall that the spoken language comes first & is much older than writing. Grammar has existed for much longer than punctuation or spelling.

@cnx It would be an exaggeration to say that punctuation cannot affect grammatical correctness, but in this specific case it's purely a matter of convention & doesn't affect grammatical correctness at all. As you yourself said.

@typeswitch, scripts are to record speech, and punctuation isn't just pretty decorators. It denotes pauses, changes in tones, and sometimes replacement for words or modifiers (e.g. quotation marks). Consider your own words by themselves:

grammar is about spoken language it s about how words come together to create sentences with meaning punctuation is part of writing not spoken language it s like spelling which is also not grammar & only applies to written language it s a set of conventions for how to record and transmit aspects of the spoken language using symbols it s good to recall that the spoken language comes first & is much older than writing grammar has existed for much longer than punctuation or spelling

@cnx @typeswitch the quotation marks placing here has more to do with typography than grammar tho
@xarvos @cnx @typeswitch I've just had a thought: the placement of the punctuation inside the quotes is basically an extreme form of kerning.
@cnx Ah I think you misinterpreted what I meant in the first post. My saying that it's not going to affect grammatical correctness should be understood in the context of the original example, not as a generality.
@cnx @typeswitch @andrewrk punctuation is covered by "orthography".

@andrewrk The Brits have just one wolf. https://en.wikipedia.org/wiki/Quotation_marks_in_English#British_style

I tend to use this for most of my casual writing, despite being American.

Quotation marks in English - Wikipedia

Thanks, @fontenot, TIL the logical way to punctuate things is actually used somewhere that is still stuck with imperial units! Cc: @andrewrk
@cnx @andrewrk @fontenot isn’t the illogical way exclusive to US (who are more obsessed with imperial units) tho
 @xarvos, the correlation is strong with this one.
Cc: @andrewrk & @fontenot
@fontenot @andrewrk For me, kerning takes care of that and both style look nearly the same :D
@fontenot @andrewrk yeah me too, because it is the logical way.

@andrewrk The cool thing about people: most of us don't really care

about formatting. As long as you get your point across clearly,

you'll get places :)

@andrewrk Many (natural) languages don't have this problem. English just needs to be fixed. We will do this over time.

@phairupegiont @andrewrk
Punctuation in German is similar:

"Punctuation marks that belong to what is reproduced literally are placed before the closing quotation mark.

Punctuation marks that belong to the accompanying clause are placed after the closing quotation mark. Both the quoted sentence and the accompanying sentence retain their exclamation and question marks."

https://german.stackexchange.com/a/74921

Punctuation inside or outside quotes

My question is in regards to how to deal with punctuation and quotes. For instance: „Hallo,“ sagte sie. „Hallo“, sagte sie. Which one is correct? „Hallo?“ sagte sie. „Hallo?“, sagte sie. Whic...

German Language Stack Exchange
@andrewrk inside me are two confused wolves because Russian and English traditions differ here and I can never remember which is which
@andrewrk The struggle is real.

@andrewrk Thank you giving me a clue that is considered the correct way in US English. I am a native German speaker and was always confused why people used quotation marks in such a weird way.

I like how having the mindset of a software developer and the German language agree on that for once.