1

The question What do numbers using 0x notation mean? currently only has the C tag. Yet all the answers would apply uniformaly to C++ as well.

It looks like a good canonical for both languages, indeed one comment even adds:

Searching for 0x prefix C++ brings you here now :)

Adding the tag therefore looks appropriate to me. Does the community agree?


As a motivating example for this post, consider this existing question about octals. It's tagged for both, and that seems to work well there.

10
  • Hmm, I am not sure, IMO a good canonical should list all possibilities of creating literal numbers (including prefixed 0 for oktal numbers) which are common for c and c++. In general this question would be OK to have both tags, since the literal building is common in this case. May 26, 2019 at 7:15
  • @πάνταῥεῖ - There is this one for octals. It's tagged for both. I don't see why we can't have a canonical for each literal type if they already exist (writing them from scratch now would be kinda daft, yes). May 26, 2019 at 7:16
  • 1
    Let's not, that never ends. There are a lot of languages that have adopted the 0x prefix. Google sorts it out well enough, second hit is the C/C++ language :) May 26, 2019 at 7:21
  • 1
    @Hans Ouch o_O ... you said "the C/C++ language" :D May 26, 2019 at 7:22
  • @HansPassant - I'm only asking because of the C/C++ nature of the question for octals. I mean, this hex question exists, it's a prime dupe candidate for both C and C++ (where this is asked fairly often). Should it not be tagged appropriately? If only to match the tags when closing against it? May 26, 2019 at 7:35
  • It is really necessary to give such a question the exalted status of a duplicate? One that needs to be kept because it might cover Google queries? Seems quite unlikely after a decade of questions about it. If you want to help then just a link to the canonical ought to be good enough. May 26, 2019 at 7:44
  • @HansPassant - No, I want to give it the exalted status of a canonical about hexadecimal literals because it's clear, on point and asks only about the literals. The indexing by google is just a cherry on top. May 26, 2019 at 7:45
  • 1
    If it's actually agnostic, then the correct action would be removing tags, not adding more.
    – Braiam
    May 26, 2019 at 13:53
  • @Braiam Well, one more would need to be added: language-agnostic. May 26, 2019 at 14:11
  • @Dukeling I'm suer you mean replacing.
    – Braiam
    May 26, 2019 at 14:45

0

You must log in to answer this question.

Browse other questions tagged .