Because as you point out yourself, there really is no need for that abbreviation. You could say "do_stuff" and it would have approximately the same meaning, but not be an undecipherable, ambiguous abbreviation.
Re:Is the C++ preprocessor still needed?
by stingraycharles on Wednesday May 10, 2017 @02:11AM
(#14306235)
Yes, but it's not the only occasion it's being used. "That must be a bug or sth" is another possibility, for example.
That "or sth" seems entirely superfluous.
"That must be a bug, or the result of hardware failure, or an erroneous report from the user, or maybe there's some other possibility I haven't thought of."
That would be "something else." The else is important.
And implicit when someone ends a sentence with "or something".
I'm a native anglophone living in the UK. I abbreviate "something" as "sthg" sometimes. I wouldn't do it in a function/variable/method/class/... name, but then I don't think I'd use "something" as part of such a name in the first place in anything I wasn't very confident would only ever be throwaway code.
Given the timestamps of the two English respondents in favour of "sth", I am tempted to amend my hypothesis to say it's a European thing, and more predominant in continental Europe.
I'm sure it's not valid across the board, but most of the internet shortenings that we use in english are acronyms---lol, stfu, wtf, rofl, hbu, asl, etc. I'm actually having a hard time thinking of some common abbreviations. I guess "func" short for "function" is a common example.
Programming has plenty of common abbreviations: obj, str, char, btn
Plus old programmers had to pay a heavy vowel tax so many, even unnecessary, abbreviations stick with us. I worked with an older guy on a game once, "extern struct CollisionManager g_clisn_mngr" is an example of the sort of things we did...
Re:Is the C++ preprocessor still needed?
by japano1se on Wednesday May 10, 2017 @03:09AM
(#14306398)
Funny you should say that. I'm from an English-speaking country and I use "sth" a lot.
Re:Is the C++ preprocessor still needed?
by tannhaeuser on Wednesday May 10, 2017 @01:29AM
(#14306102)
Similarly OT, a pet peeve of mine is how Germans and others consistently pronounce (the eg. SQL datatype) VARCHAR as var-CHAIR or sometimes var-CZAR (war czar, warczaw) when they pronounce CHAR/CHR correctly.
Re:Is the C++ preprocessor still needed?
by anonymouz on Wednesday May 10, 2017 @02:54AM
(#14306357)
Out of interest, what do you consider to be the correct pronunciation of CHAR? There seems to be considerable variation in how people pronounce it (see e.g. [1,2]). Personally I have always used the '/tʃɑr/' one, and similar for VARCHAR.
[1] https://english.stackexchange.com/questions/60154/how-to-pro... [2] http://www.stroustrup.com/bs_faq2.html#char
Re:Is the C++ preprocessor still needed?
by tannhaeuser on Wednesday May 10, 2017 @07:06AM
(#14307288)
As in "character" for which CHAR and VARCHAR are abbreviations?
Disclaimer: not an English native speaker
That's because the English language is a mess with respect as to how something is pronounced.
Great point! The words... their, mare, hair, where... all rhyme in English. This drives Spanish speakers crazy.
Or because it behaves just like a pidgin..
We're going with VAR-care and care as correct pronunciations of both, right? Asked as a native US English speaker.
I've never heard it pronounced that way, although 'care' is how the first syllable in the word 'character' is pronounced.
I've always heard it pronounced var char (the parts rhyme). Char is pronounced like when you burn/blacken a steak. "Char-grilled food is cooked over or under direct heat so that its surface becomes slightly black"
Logic dictates it should be pronounced as char-acter, but my brain brings out char-coal always.
I'm Dutch, so I pronounce it with a hard ch as in loch, even when speaking English.
If I'm understanding you correctly, then most English speakers would call that correct. It's short for "character" so is pronounced as the first syllable of that (with a hard 'ch') not like the word "char" is pronounced. I think I personally would swap between the two fairly randomly, probably due to learning to code from text-based sources and not hearing it pronounced till much later.
To be clear: I do not mean the /k/ sound, but the /x/ or /χ/ (voiceless velar/uvular fricative), which is seldom used in English, except when properly pronouncing the names of Scottish lochs, or the name of J.S. Bach. Maybe it's not even used at all in English, but only in Scottish, but we're getting off-topic already.
If I were consciously trying to pronounce "char" as an English speaker would, I would probably say /tʃɑr/.
Interesting; I pronounce "loch" as "lock" and Merriam-Webster seems to agree. https://www.merriam-webster.com/dictionary/loch I guess you're referring to the UK pronounciation listed
here instead?
http://dictionary.cambridge.org/us/pronunciation/english/loc...
I thought the use of the specific word "loch" would have been clear enough, but apparently the pronunciation of that word I thought I'd heard a lot on the BBC is not known as widely as I thought. Maybe I'm misremembering. None of the pronunciations you linked to is what I intended. See https://en.wikipedia.org/wiki/Voiceless_velar_fricative or https://en.wikipedia.org/wiki/Voiceless_uvular_fricative , as well as https://en.wikipedia.org/wiki/Scottish_English#Phonology .
Re:Is the C++ preprocessor still needed?
by santaclaus on Tuesday May 09, 2017 @11:26PM
(#14305700)
I'm partial to usw
I love how reliably abbreviating "something" (e.g. "sth", "smth" or "sthg") indicates that the person isn't from an English-speaking country. I wonder why this abbreviation has never caught on in English-speaking countries. I think the abbreviations got popularised in non-English-speaking countries by English dictionaries.
I think the more common idiomatic "abbreviation" would be "do_stuff" when you don't want to type out or say "something".