3 ms·
So I think the strings.Compare should be implemented efficiently, to avoid breaking user expectations. Is Go forkable (for lack of a better word)? That's the o
by userbinator 4y ago
So I think the strings.Compare should be implemented efficiently, to avoid breaking user expectations.
Is Go forkable (for lack of a better word)? That's the only question that comes to mind when I read the article. You have the source code, and this shouldn't be a difficult change to make, so I think "fork-and-fix and see who follows along" should be the mentality to practice in this case.
- mplewis 4y agoNo one will follow along. If you want to implement strings.Compare better, you can write a package and publish it for other folks to import. The function is not particularly special.
- userbinator 4y agoNo one will follow along. "The only sure path to failure is to not even try." Or are you both implying the power of and supporting the massive monopoly that Google already has?
- TillE 4y agoEncouraging people to use a different language entirely (Rust, whatever) is much much more likely to succeed than getting them to use some random Go fork.
- robertlagrant 4y ago> Or are you both implying the power of and supporting the massive monopoly that Google already has? This is not a reasonable assessment. Golang is massive; why would anyone switch to not-Golang which isn't backed by a large organisation and just has one string comparison optimisation? And why would anyone trust a forking entity that forked a runtime to make a change that could be packaged as a library, as the comment you're replying to already suggests?
- somekyle2 4y agoIf anyone finds "a standard library string comparison function, while quite fast in absolute terms, isn't as fast as it could be" to be practical justification for a fork, I'd be very surprised.