logoalt Hacker News

compiler-guyyesterday at 6:15 PM0 repliesview on HN

Google could easily change these lines. The question is, should it?

One thing about Google living so close to head with its libc++ is that it encounters the issues downstream users will encounter, just long before everyone else. It saw this development within a day or two of the or getting merged.

The idiom is unfortunately common in C++ codebases around the world so this was a good predictor that many other users will be broken. It isn’t necessarily erroneous, unlike many of the other no-discard additions made in this patch series.

So the question becomes, “Are the false positives worth the true positives?” Not just for Google, but for the entire user base.

It is reasonable to disagree on this, and often library writers up to date on the latest and greatest miss the issues this sort of change will cause.