17

Both C++ and Rust have libraries named chrono. Currently, most questions in the tag are about C++ (837 questions) and the tag description is also explicitly about it, but there are 19 questions tagged .

It may be good to have separate and tags, or at least have a tag and referring to it in the tag.

18
  • 1
    Does chrono in Rust do something different to the chrono in C++, or do they actually achieve the same thing(s)?
    – Thom A
    Commented Dec 8, 2022 at 12:36
  • 4
    @Larnu Both are date&time libraries. But I think the policy is still to have them separate, no? Commented Dec 8, 2022 at 12:37
  • 6
    If you retag the rust questions to [rust-chrono] (the normal convention is lang-thing rather than thing-lang), I can rename the existing tag afterwards. The libraries are different, so they shouldn't have a unified tag Commented Dec 8, 2022 at 16:00
  • The numbers don't add up! (938 total questions.) Some of that's because people are using version tags (eg c++11) and some of that's because there are questions that are not about C++ or Rust. Someone needs to go through those questions before a massive rename.
    – Laurel
    Commented Dec 8, 2022 at 17:58
  • 1
    @ZoestandswithUkraine: Most C++-specific tags put the C++ first. Like "c++-modules" and "c++-coroutines". Commented Dec 8, 2022 at 18:49
  • 1
    @NicolBolas yeah, which is lang-thing. The plan was to rename the current tag (after getting rid of Rust questions) to c++-chrono in line with that convention. Commented Dec 8, 2022 at 18:54
  • @Laurel How can I search for questions which are tagged [chrono] but neither [c++] nor [rust]? Commented Dec 8, 2022 at 19:14
  • [chrono] -[rust] -[c++] Commented Dec 8, 2022 at 19:32
  • Use -[tag-name] for each tag to exclude. Try this search. I've been adding the main language tag to questions that didn't have one.
    – Laurel
    Commented Dec 8, 2022 at 19:35
  • I've checked all questions tagged [chrono] with neither of [rust], [c++] nor any c++ version. I removed the tag from some (one about some company's named DrChrono API and two about Android's Chronometer) and all the rest are about C++'s chrono, except three: this is about a js library named react-chrono, and this and this are about C++ Boost's chrono. What am I supposed to do with them? Commented Dec 8, 2022 at 22:31
  • Boost has a full suite of sub-libraries, there are some narrower tags for some of Boost's libraries (search for [boost-*] to see some of the tags) like [boost-chrono]. I'd use that tag since it already exists, but if it didn't, those questions could probably stand just fine with just [boost] (and a C++ tag probably) alone.
    – kmdreko
    Commented Dec 8, 2022 at 22:45
  • 1
    @kmdreko: Questions about std::chrono should not be tagged [boost-chrono] (which currently has 2 questions, BTW). C++ standard library features often start of as part of Boost and get standardized, but once they are standardized, that history isn't relevant, and it makes no sense to expect people to remember which things came fro boost and which didn't. In this case, boost::chrono was written to implement the C++11 chrono proposal before it became official, as a testing ground. boost.org/doc/libs/1_80_0/doc/html/… Commented Dec 9, 2022 at 0:42
  • 1
    @Larnu There is no chrono in Rust. It's a 3rd-party library, unlike C++ where std::chrono is a core language library. Both are trying to solve similar problems in providing robust and universally usable date/time primitives, with only C++' std::chrono delivering on those goals. Commented Dec 10, 2022 at 8:36
  • 1
    I created [drchrono-api] and [react-chrono]. All the questions now that aren't tagged with [rust] or [c++] are about C++ or using its library in another language.
    – Laurel
    Commented Dec 10, 2022 at 13:42
  • 1
    @NicolBolas Done. Thanks for the ping! Commented Dec 11, 2022 at 18:03

3 Answers 3

8

If the intent is to split these tags, the current convention in C++ tags is that the "c++" part comes first. As seen in or . So the tag ought to be

7

We already have . The stats at the time of writing are:

The outliers are the ones in the third bullet point. Any of us with edit privileges is in good position to edit these questions to use . Subsequently, can be renamed to and the former made a synonym of the latter, to prevent ambiguities and reduce the chance of misuse in the future.

This is no different from what was done with the tags for itertools.

1
  • 1
    Looks like all of the rust+chrono questions got cleaned up. Rename away! Commented Dec 10, 2022 at 18:38
3

There is no need to split up the tag into two (or more) variants. Tag prefixes are pointless and annoying.

Because we allow questions to have multiple tags, questions about C++'s std::chrono functionality should be tagged and . If you are interested in Rust questions about the Chrono library, then you search for " ". There is no actual problem here to be solved.

Note that we don't have , either; just (and ).

9
  • 2
    "Note that we don't have c++-string, either" Mostly because string is a technology agnostic concept that may apply to a multitude of programming languages. Granted, we don't want one tag for each language with a string implementation. Giving an independent tag to a popular library is reasonable, OTOH. This suggestion also contradicts the prior tag handling policy that tags should not refer to multiple things. Tags in the past which have been split include itertools and serde.
    – E_net4
    Commented Dec 10, 2022 at 10:27
  • 5
    "There is no actual problem here to be solved." - That was my initial instinct as well. The chrono tag is (or should be) orthogonal to the language it is being used with. If we start encoding language hints into tags that describe core principles, we're in for a combinatorial explosion that is detrimental to usability/discoverability. The only thing that should be done here is updating the chrono usage guidance to deliver the message that chrono is commonly used to describe a concept, not a concrete implementation. Commented Dec 10, 2022 at 13:17
  • 1
    @IInspectable: "chrono is commonly used to describe a concept, not a concrete implementation" But it isn't. Until C++11 added the <chrono> header, if you had asked anybody what "chrono" meant, the most they could do was assume that it had something to do with time, because that's what the word literally means. It was never used to describe a concept; it was only ever used to describe the C++11 library component. And Rush uses that name for its similar component because... it borrowed the API and concepts from the C++ library. Commented Dec 10, 2022 at 18:24
  • 1
    @CodyGray: "Note that we don't have c++-string, either; just string (and c++)." But we do: stdstring. And note that C++ actually has several string types: char*s, std::string, and std::string_view. So there is a distinction between questions asking about "string" and questions asking about std::string. Commented Dec 10, 2022 at 18:31
  • @NicolBolas std::chrono had been in the making since 2008. That's 14 years ago. For 70% of developers it had always been there, and things that were true in 2011 are not necessarily true today. As for stdstring, I wonder why there is no stdwstring, stdu8string, stdu16string, and stdu32string. Multiply that by two if you think that std::string_view were a string. It doesn't appear to be immediately helpful to establish that sort of fragmentation. Commented Dec 11, 2022 at 16:55
  • 2
    @IInspectable: "As for stdstring, I wonder why there is no stdwstring, stdu8string, stdu16string, and stdu32string." Because they are functionally the same type. People didn't make a tag for them because they have virtually identical interfaces. "It doesn't appear to be immediately helpful to establish that sort of fragmentation." Yet it already exists. The chrono tag was specifically created for the C++ standard library component, not for general timing stuff. Allowing tag drift where it now means something other than what it was intended to mean makes no sense. Commented Dec 11, 2022 at 16:58
  • 1
    @IInspectable: "For 70% of developers it had always been there, and things that were true in 2011 are not necessarily true today." That says absolutely nothing about whether the term "chrono" is understood as a generic term for "date/time library" (which is what you claimed it was). That just shows that most C++ programmers know that, when you say "chrono", you're asking about the C++ date/time library. Not Rust's library, not Java's date/time library, not C#'s date/time library. Specifically C++'s library. Commented Dec 11, 2022 at 17:00
  • @NicolBolas "Allowing tag drift where it now means something other than what it was intended to mean makes no sense." - Maybe so, but what damage is done by allowing chrono to be used in combination with, say, rust? Does this make finding answers for C++ any harder? Does it cause any confusion for C++ developers? Rust developers? Developers using a language other than those two? Commented Dec 11, 2022 at 17:09
  • @IInspectable: This is what the Tag wiki looked like when people started dumping Rust questions into the chrono tag. If you allowed this, you would have to change the Tag wiki to say something very different. So... what would it be changed to? "The 'chrono' tag is for generic timing libraries?" That's redundant; we already have date,time, and datetime for that. Commented Dec 11, 2022 at 17:13

You must log in to answer this question.

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