2 ms·
It's not a TODO yet, it 's a note that says if you think this would be a good idea, do that instead. It's a potential TODO-to-be, waiting for the need.
by yencabulator 4y ago
It's not a TODO yet, it 's a note that says if you think this would be a good idea, do that instead. It's a potential TODO-to-be, waiting for the need.
- saghm 4y agoIs that better? That would mean that they have a method in their API that they don't think anyone should use but haven't deprecated it or documented it that way and have no plans to do anything about it.
- yencabulator 4y agostrings.Compare is mostly used in trivial demonstration programs, and is there because bytes.Compare is there. It makes https://pkg.go.dev/sort#Find https://pkg.go.dev/sort#Find documentation simpler. Deprecating strings.Compare would make sort documentation worse. Real code tends to not be that trivial, and that's why real code most likely shouldn't be using strings.Compare.