5

Last week I answered an ancient question on how to slice arrays in C#.

This question itself has quite high traffic (quarter million) and a dozen of good answers, all highly upvoted and easily visible for whoever finds themselves in the same spot as the OP. But due to the lack of inate support from the language then, they all rely on linq or making a new method (Which i'm by no means saying is a bad solution now. They're still good and viable answers).

However languages keep evolving and adding new features, and C# is no exception to this. And coming in C# 8.0 there will be native support for slicing arrays.

As my answer will be at the bottom of the quite extensive list of previous answers I don't think a lot of people will come across this new information, as it won't appear early in either the sort by votes, or sort by oldest.

A few things I thought of were:

  • Do nothing. (Don't fix what isn't broken, as the old answers are still viable aswel)
  • Suggest an edit to the accepted answer, adding an "Update: since X, Y can be used aswel". (This will change the intent of the original answer, but spread the new knowledge easily. I think this is currently the best approach for a community answer)
  • Add a bounty on the question to draw some attention to it. Though this will generate more traffic it will probably still just attract to the top 3 or so answers.

A thought is maybe having a "sort by newest" option on answers would be nice, as i think it would allow for information introduced by new language features on old questions to become more accessible (I feel like only sorting by oldest will create a sort "bubble" of answers build upon old information.)

tl;dr What is a good approach to bring new language features, solving old problems to the attention. And thus prevent new information from being buried under old workarounds?


Though i'm using the "Array slices in C#" question and answer in this post, it is mainly to be taken as an example and think this should be applicable to any similair situation, where a language adds a new feature that can solve old problems natively.

4
  • You can already sort by active which sorts by the last modification date.
    – BDL
    Apr 9, 2019 at 11:50
  • 1
    @BDL This will also bring the last voted/commented on question to the top though. And as the top answers usually keep on garnering votes over time they will also go to the top on that list, again drowning out new answers.
    – Remy
    Apr 9, 2019 at 11:55
  • 1
    Voting doesn't affect the sorting. If I sort your example question by active, your answer is second (after the top-pinned accepted answer)
    – BDL
    Apr 9, 2019 at 11:56
  • Oh I see! I had previously misunderstood how the "active" search works then. I didn't know that the top answer was always the "accepted" answer, and thought that the top answer was the last voted on. Then I do suppose that that works as a "newest" first. Thanks for the clarification on that @BDL
    – Remy
    Apr 9, 2019 at 12:48

0

Browse other questions tagged .