3
$\begingroup$

I spent time writing my question, and it's about language design, who downvoted it and why?

Why does C have missing library functions?

$\endgroup$
1
  • 3
    $\begingroup$ To add to the existing answer, I think the title is misleading: it doesn't have missing functions, it lacks certain functionality. $\endgroup$
    – Bbrk24
    Commented Jun 28, 2023 at 21:01

3 Answers 3

6
$\begingroup$

I downvoted your question.

I think it is hard to say for certain whether the question is on- or off-topic because this site does not yet have any official guidelines one way or the other, but I think it is arguably on-topic. I would personally like to see fewer “why did they do it this way” questions (we currently have a lot of them, and I’m not sure they attract particularly great answers), but that does not on its own make the question off-topic, nor is it why I downvoted.

I downvoted for the reason I gave in a comment on your question:

I don’t think you are likely to find any satisfying answer to this question. The reasons are almost certainly not because of any particular principle so much as “because that was what they needed for the programs they were writing so that was the way they did it”.

I don’t think this answer provides any insight into programming language design or implementation. The same exact question could be posed about any other library. Sure, it happens to be about C’s standard library, but the fact that it is the standard library has no actual bearing on the question.

Voting on Stack Exchange sites has essentially no rules (outside of targeted voting for/against a particular user), but the on-topicness is perhaps more interesting to discuss, so I have opened a followup question about it: What makes a question about a programming language’s standard library on-topic?

$\endgroup$
8
  • $\begingroup$ You could have just left the comment and not downvoted. $\endgroup$ Commented Jun 29, 2023 at 17:22
  • 5
    $\begingroup$ @NikeDattani Sure, I could have. But the description on the downvote button says “This question does not show any research effort; it is unclear or not useful”. I didn’t think the question was useful. $\endgroup$
    – Alexis King Mod
    Commented Jun 29, 2023 at 18:20
  • 2
    $\begingroup$ @NikeDattani I don’t. Why do you care? $\endgroup$
    – Alexis King Mod
    Commented Jun 30, 2023 at 1:02
  • $\begingroup$ I care about mistreatment of users on this platform, because it affects the whole community, culture and future of the entire network of sites, including one that I built. $\endgroup$ Commented Jun 30, 2023 at 3:40
  • 3
    $\begingroup$ @NikeDattani I care very much about treating people with respect. I think my answer is perfectly respectful, but by all means, tell me if you think something in it isn’t! I don’t think downvoting someone’s question constitutes “mistreatment”—the button is there because SE is democratic. I was not the only person who downvoted it, but it’s currently sitting at +6, so I think the system is working fine. $\endgroup$
    – Alexis King Mod
    Commented Jun 30, 2023 at 3:47
  • $\begingroup$ You agree that you could have left the comment without downvoting, and that just because it says you can downvote doesn't mean you have to. You asked me why I care and I gave my reason. Now you're talking about respect. Most people would say that asking things like "why do you care?" is disrespectful. As for whether or not the system is working "fine", I disagree along with 10s of 1000s of people that complain about SE being toxic, but it's probably a conversation better left for chat! $\endgroup$ Commented Jun 30, 2023 at 3:57
  • 2
    $\begingroup$ @NikeDattani I apologize for being a bit curt. But if asking “why do you care” is disrespectful, I think telling me that I don’t have to “blindly follow that every time” certainly is, too, if not more so! Feel free to read any of my numerous Stack Overflow answers in case you are worried I am “toxic”. $\endgroup$
    – Alexis King Mod
    Commented Jun 30, 2023 at 4:02
  • $\begingroup$ AlexisKing, fair enough. $\endgroup$ Commented Jun 30, 2023 at 5:01
3
$\begingroup$

Welcome to PLDI! In this particular case, I believe your question was downvoted because of the implicit expectation that C should have an equivalent memory operation for every string operation when in fact needle in a haystack for memory is a very niche (and possibly dangerous if improperly developed) function. Furthermore, I believe questions on a particular language's decisions are off-topic, insofar as no other language AFAIK has chosen to have equivalent memory operations for each of its' string operations, nor is there a very clear usecase for it. And most importantly, neither did your question focus on why a language may or may not implement such functions, but rather why specifically C didn't do so.

A question along the lines of 'Why would a language implement these functions for strings and not for generic memory blocks' or "what are the downsides of implementing all string functions as wrappers on memory functions" might be more ontopic.

$\endgroup$
7
  • 4
    $\begingroup$ "questions on a particular language's decisions are off-topic" ─ where was that agreed? I think such questions can definitely be on topic. Also, if the objector thought the question was off-topic then they ought to have voted to close it, not just downvoted. $\endgroup$
    – kaya3
    Commented Jun 28, 2023 at 21:04
  • $\begingroup$ I recall we even agreeing against it @kaya3-supportthestrike $\endgroup$ Commented Jun 28, 2023 at 21:10
  • $\begingroup$ Good point. To be clear, I didn't downvote it, but I think they may be considered offtopic by some when the question is specifically targeting a programming language and not its' differences with other languages. Case in point, I know of no language that has every single function for strings also implemented for memory blocks. $\endgroup$
    – kouta-kun
    Commented Jun 28, 2023 at 21:10
  • $\begingroup$ There are counterexamples here, here, here and here of questions which ask why one particular language is designed or implemented a certain way. Some of them mention other languages that have contrasting designs or implementations, some don't. All are well-received. $\endgroup$
    – kaya3
    Commented Jun 28, 2023 at 21:21
  • $\begingroup$ @kaya3-supportthestrike I respectfully disagree, all of those questions ask something that is strange in contrast to other languages: rust's loops have values, APL has a deep transpose which even modern numpy doesn't have, C had a worse convention than its' predecessors and Python's type hints are merely decorative (in contrast to most other languages checking them at either runtime or compile time). In this particular question, something is being asked of C that no other language assures: orthogonality between strings and generic memory ranges. $\endgroup$
    – kouta-kun
    Commented Jun 28, 2023 at 21:24
  • $\begingroup$ That may be true, but you said that "questions on a particular language's decisions are off-topic", and all of those questions are on a particular language's decisions and have been considered on-topic. I also think it makes some sense to ask about C when other languages have made the same decision, because C may have made it for different reasons and the asker might want to know specifically about C; and asking specifically about C doesn't preclude the answer applying to other languages too. $\endgroup$
    – kaya3
    Commented Jun 28, 2023 at 21:26
  • $\begingroup$ Here's a meta Q&A in which the consensus is that questions about a particular language are on-topic: langdev.meta.stackexchange.com/q/96/89 $\endgroup$
    – kaya3
    Commented Jun 28, 2023 at 21:40
1
$\begingroup$

I see nothing particularly wrong with your question, and I wouldn't worry about getting just one downvote. People can downvote for any reason, and there is also a comment explaining why one person thought your question wasn't likely to get a useful answer, so you can take that as feedback if that's what you're looking for.

I thought there was at least something useful to say about your question so I wrote an answer to it. But if other people think the question and/or my answer isn't useful then they can downvote it, that's just how the Stack Exchange Q&A format works.

Welcome to the site!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .