10

We have several different tags which are used in the context of passing an unspecified number of arguments to a function or method:

  • × 537
    Wiki Summary: Variadic functions are functions which accept a variable numbers of arguments.
    Also has a good tag-wiki.

  • × 304
    Wiki Summary: functions that accept varying numbers of arguments -- for example, the function may be called with 1 argument or 2 arguments.

  • × 194
    Wiki Summary: In computer science, an operator or function is variadic if it can take a varying number of arguments; that is, if its arity is not fixed.

  • × 88
    No wiki

  • × 42
    No wiki

  • × 10
    Wiki Summary: A parameter, operator or function is classed as variadic if it can taking a variable number of arguments.

Can we re-tag and merge these tags, or mark them as duplicates?

Also related: (× 868), (× 71) and (× 16) cover subsets of the general theme. So they are not synonyms in the strict sense, and therefore not covered by this request here.
Sometimes (x 525 + x 75) is more appropriate though.

1
  • I just came across varargs/variadic-functions myself. I think this could do with being shuffled along from discussion to taking concrete action. Mar 10, 2015 at 5:43

5 Answers 5

4

I'm writing two proposals, which are not mutually exclusive. Please vote as you see fit.

Keep

We could merge the listed ones into that. In this setup, we'd distinguish things that tag from the ones for templates and macros. In languages where such a distinction is moot users might be confused. The name “variadic functions” matches the title of the corresponding Wikipedia article, which might help consistency.

If we also keep , then that would be a common supertag for functions, templates and macros.

3

This is now partially completed.

I merged the tag into the tag and created a synonym mapping, essentially doing what was recommended here.

That effectively gives us the best of both worlds: the master tag is a more descriptive one, but for programmers that know it by the term "varargs", they can type "varargs" into any textbox on the site and it will be automatically remapped to "variadic-functions". Thus, no one has to actually search for "variadic-functions".

Same thing with , , , , and . Looking carefully at the questions with these tags, they were not used in a manner distinct from , so merging was appropriate. There is no need to have separate tags for and . If your question is about either of those things, you have a variadic function. This fixed all of the questions with only or , which were easily lost.

I also manually merged in the tag wiki information from into , so the tag has an acceptable wiki now.


I did not touch the tag. An automatic merge is not appropriate here; it needs to be manually cleaned up in order to allow a human brain to disambiguate between and . (No, I don't think all of these should be made synonymous with .)

-1

Keep

As this Google Trends comparison demonstrates, it is a rather commonly used term, even outside C or C++ circles.

Note that this applies mainly to functions (methods). can be a synonym for users who search by the technical term. This seems to be quite rare, as per the search trends linked above.

-2

Merge them all into one (new)

(and give this an additional synonym ?)

3
  • I just found another tag (varargs) with a much larger number of questions.
    – metacubed
    Nov 7, 2014 at 8:46
  • Indeed time for a cleanup then ;-) I still propose 'variable-arguments' which is easier to understand (less 'techie')
    – Jan Doggen
    Nov 7, 2014 at 9:44
  • I for one wouldn't understand variable-arguments, and wouldn't search for it either. The full term is “variable number of arguments”. The arguments themselves are not neccessarily variable. If that variable-arguments tag would already exist, I'd suggest keeping it as a synonym, but since it's absent so far I guess the existing tags are easy enough to find - or at least one of them. As the canonical form I'd prefer a technical and therefore exact term.
    – MvG
    Nov 20, 2014 at 22:06
-2

I'm writing two proposals, which are not mutually exclusive. Please vote as you see fit.

Keep

We could merge all the listed tags into that, and also add that tag to questions tagged or similar. “Variadic” the appropriate technical term here, and covers all situations, including variadic templates and macros.

If we also keep then that could be used to distinguish functions from templates while keeping the more general tag for common issues.

The most-often-used tag name is common for C programmers, but might be too language-specific, so I'd avoid that, and instead use some longer, more descriptive and less implementation- and language-specific term.

2
  • 1
    Best keep varargs instead. It's short and sweet, and not nearly as restricted to C and C++ as you think. 388 of 533 questions are neither tagged C nor C++. Nov 21, 2014 at 0:25
  • 2
    @Deduplicator I've added that as an answer so people can vote on it.
    – metacubed
    Nov 21, 2014 at 4:56

You must log in to answer this question.

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