10

In the spirit of promoting technically accurate language, could we retag to (except for the two cases mentioned below)?

The spread syntax refers to the JavaScript ES6 language feature (as noted by 75 out of 83 questions being tagged ), and because it is not a context-free grammar, it does not formally qualify as an operator. For more information on why this is so, see What is SpreadElement in ECMAScript documentation? Is it the same as Spread operator at MDN? and Is ...foo an operator or syntax?

Except for the two questions linked below, the rest of the questions that aren't tagged + are already tagged , or already contain 5 other more relevant tags. You can check them out for yourself.

In contrast, Groovy and Kotlin do in fact have a spread operator, and both languages have a single question on Stack Overflow tagged here and here respectively.

Adding a wiki for each [spread-*] tag should clarify that refers to the *. infix binary operator in Groovy and * prefix unary operator in Kotlin, while is to be used for ... syntax in JavaScript.

I don't mean to be a , and I haven't even always felt this way, but I just think that as part of Stack Overflow's mission, we should be promoting the correct terminology. I've long since given up on the JSON object1 holy war, but this correction seems a lot less controversial to me.

Update

Here are the usage excerpts for each tag that I've suggested:

Please do not use this tag to refer to the spread syntax "..." in JavaScript. Use [spread-syntax] instead. In Groovy, the spread operator (*) is to extract entries from a collection and provide them as individual entries. This can be useful for converting collections to individual parameters on method calls. In Kotlin, the spread operator (*) allows a variable number of arguments (vararg) to be passed via the named form.

Please use this tag to refer to "..." in JavaScript. Spread syntax allows an iterable such as an array expression or string to be expanded in places where arguments for function calls, elements for array literals, or key-value pairs for object literals are expected.

1 See What is the difference between JSON and Object Literal Notation?

18
  • 1
    this correction seems a lot less controversial to me. ... well, at least one viewer disagreed with that ..
    – rene
    Commented Aug 1, 2018 at 18:40
  • @rene apparently :\ Commented Aug 1, 2018 at 19:38
  • 4
    You forgot to cite this canonical answer as well as Is …foo an operator or syntax?. +1 nonetheless, this needs to be fixed!
    – Bergi
    Commented Aug 2, 2018 at 20:01
  • @Bergi I've added them, thank you for the links, it's been a while since I've seen those. Commented Aug 2, 2018 at 21:15
  • Wow, the +4/-3 makes this seem quite controversial as rene suggests. However, the fact that a top user of the tag (Bergi) recommended this, I'm more tilted towards going with your suggestion. Is there any reason why you need a new tag + synonym, rather than a tag rename?
    – Bhargav Rao Mod
    Commented Aug 2, 2018 at 21:34
  • @BhargavRao if my request doesn't make much sense it's probably because I'm wording it wrong. My request is that everything currently tagged spread-operator automatically be changed to spread-syntax, however that's accomplished. If people type in spread-operator, the tagging UX should suggest spread-syntax instead. Commented Aug 2, 2018 at 22:41
  • 2
    Cool, that answers my question. There's a tag renaming tool for that which does the change automatically (also see rename-request). I'll wait for a day and see if there are any additional discussions on this post, if not, I'll rename the tag directly.
    – Bhargav Rao Mod
    Commented Aug 2, 2018 at 22:50
  • @BhargavRao before you do that, make sure the tool will be able to keep the spread-operator tag separate, see my edit for the two questions out of 83 that are actually tagged correctly. Commented Aug 3, 2018 at 0:04
  • 1
    Hmm, if that's the case, then I will keep both the tags separate. [spread-operator] for the 2 groovy/kotlin ones and [spread-syntax] for the remaining 81 Javascript questions. How bout that?
    – Bhargav Rao Mod
    Commented Aug 3, 2018 at 0:11
  • 1
    @BhargavRao yes, that is correct. Commented Aug 3, 2018 at 0:12
  • Looks like I've got some more support now that everything's sorted out. Is everything good to go @BhargavRao? Commented Aug 4, 2018 at 0:57
  • Yep, @Patrick, except that I'm a bit held up in a Friday evening meetup. I'll handle this once I'm back home. Also, there's one task left for you. Write down the drafts for the tag wikis, and add them after I've done the renames. :)
    – Bhargav Rao Mod
    Commented Aug 4, 2018 at 2:48
  • 2
    @BhargavRao thank you so much, I added excerpts for now that need to be peer reviewed. I'll add full wikis later when I'm feeling more up to it. Commented Aug 4, 2018 at 5:47
  • 1
    @OlegValter unfortunately it will never be completed for good, but I appreciate the optimism. Every time I check there are at least a few more poor lost souls that have erroneously tagged new questions with spread-operator. The consensus seems to be that most users don't actually read the tag wikis like they're supposed to. Commented Oct 4, 2021 at 2:32
  • 1
    I think one of the main contributors to this particular misnomer is the fact that MDN has categorized spread syntax under "operators", simply because there's no category for "syntax". Commented Oct 4, 2021 at 2:34

0

You must log in to answer this question.

Browse other questions tagged .