Last year I "left" Stack Overflow but, as predicted, recently found myself trickling back onto it for the fame and glory.
Then, this.
My question (which you won't be able to view live without sufficient rep):
NB: I'm sure someone will call this subjective, but I reckon it's fairly tangible.
C++11 gives us new
basic_string
typesstd::u16string
andstd::u32string
, type aliases forstd::basic_string
andstd::basic_string
, respectively.The use of the substrings
"u16"
and"u32"
to me in this context rather implies "UTF-16" and "UTF-32", which would be silly since C++ of course has no concept of text encodings.The names in fact reflect the character types
char16_t
andchar32_t
, but these seem misnamed. They are unsigned, due to the unsignedness of their underlying types:
[C++11: 3.9.1/5]:
[..] Typeschar16_t
andchar32_t
denote distinct types with the same size, signedness, and alignment asuint_least16_t
anduint_least32_t
, respectively [..]But then it seems to me that these names violate the convention that such unsigned types have names beginning
'u'
, and that the use of numbers like16
unqualified by terms likeleast
indicate fixed-width types.My question, then, is this: am I imagining things, or are these names fundamentally flawed?
It was a polarising question, with as many upvotes as downvotes, and it was closed but managed to attract a string of re-open votes, not to mention a high-powered and professional debate in the comments. Admittedly, discussion is not supposed to take place in SO comments, but there we go.
I didn't mind it being closed, though of course I voted to re-open.
But the kicker is what moderator George Stocker did with it: after posting the following comment…
The problem with this question is the last sentence, "Are these names fundamentally flawed?" Let's imagine for a second that the answer is 'yes'. how does that 'yes' answer help us? It doesn't.
… he used his moderator powers to delete the question outright.
Now question deletion, in my day, was a power of last resort, reserved only for questions of such a clear lack of value that they amounted to nothing more than monkeys writing Shakespeare, or viagra spam. It overrides the open/close-voting that has made Stack Overflow such a powerful community-driven tool in the past.
But it would seem that during my time away, this has changed. Whether or not you agree with me that since the question was tagged language-lawyer
the question is completely relevant (if the answer is "yes" then that helps us to rationalise about and hopefully improve the C++ language), is it not deeply disturbing that moderators are now seemingly running around Stack Overflow, deciding what should be forever deleted, on a whim?