24

Here's a project for anyone who likes editing tag wikis.

PHP and JavaScript have a lot of the same standard methods for dealing with arrays such as map, filter, reduce, splice, etc. In PHP they are functions which take the array as an argument and in JavaScript they are instance methods on the array object prototype. Those sorts of function probably appear in other languages too.

The tags that exist for these array functions are handled very inconsistently. Some mention JavaScript, some mention PHP, and some mention that the tag is intended to be language agnostic. Ideally all of the tags would be language agnostic and include examples for multiple languages. The foreach wiki is a good example.

There is a tag for the JavaScript function which is the only tag following the array.prototype naming convention. It should be merged with .

There are a lot of tags that could use wiki improvements, including, but not limited to,

Some of the PHP functions don't have a direct JavaScript equivalent, but they still describe the general idea that you could execute in any language:

On the other hand, some of the PHP terminology is unique:

All tags containing 'array' on Data Explorer.

9
  • 4
    array-reduce has only 34 questions, people use the reduce tag for questions about the reduce function, yet its tag wiki mentions apache hadoop. But, there is an even bigger tag for that: mapreduce. What a mess. Commented May 30, 2021 at 20:03
  • 2
    Just nuke everything from orbit, it's harder to try and enforce a proper usage.
    – Braiam
    Commented May 30, 2021 at 20:25
  • 8
    Many of these functions/methods are not array-specific, but could be used on any collections. [array-map] is an instance of the generic [map-function] for example.
    – Bergi
    Commented May 31, 2021 at 1:24
  • 7
    This post may benefit from breaking this massive task off into chunks, there's a lot to take in here.
    – zcoop98
    Commented May 31, 2021 at 2:07
  • 1
    I agree with Bergi - as we all know even most of the JavaScript methods are intentionally generic, so I think they should be abstracted to corresponding concepts (like Bergi's example of the map function). That would require tag renaming, though (or creating the target tags and synonymizing each of the listed to a corresponding target). Then we can deal with the wikis - what do you think? Commented May 31, 2021 at 5:48
  • 2
    @Oleg I generally prefer tags that are specific and clear over ones that are vague and meta. array-unique has an obvious intention which is to discuss finding the unique items in an array, whereas unique could have lots of meanings. Same for map combine etc. My personal opinion is that the array method tags are good as long as they are described properly. But I may be wrong and I’m open to that 😜 Commented May 31, 2021 at 18:45
  • 4
    @LindaPaiste Sure, I'm all for precisely described and well-used tags. I just wanted to mention that for some of them we could consider merging them with datastructure-agnostic ones.
    – Bergi
    Commented May 31, 2021 at 20:47
  • 1
    Do we really need a tag for every conceivable function? For generic methods it could be useful, like the once you describe here, and for very language specific methods (e.g. parfor), but given the 5-tag-per-question limit, that's about it. I'd therefor agree with making the descriptions language-agnostic, in the hope that using them in conjunction with a language tag should be enough. But then again, hardly anyone actually reads tag wikis.
    – Adriaan
    Commented Jun 1, 2021 at 13:37
  • @LindaPaiste - I think we do not disagree on this :) Mine was just another opinion in favour of generalizing the descriptions and keeping the tags (similar to what we did with triggers). Sounds like there is a general agreement as to how to proceed with your idea - let's give it a couple of days to amass suggestions and start gradually updating the wikis and cleaning up where necessary. Commented Jun 1, 2021 at 13:58

0

You must log in to answer this question.

Browse other questions tagged .