4 ms·
Is the opt-in versus opt-out point at the end of the article really important? Even if the compiler is opt-in you could use a separate tool to enforce preventin
by meitros 4y ago
Is the opt-in versus opt-out point at the end of the article really important? Even if the compiler is opt-in you could use a separate tool to enforce preventing unsafe memory idiom usages unless annotated (akin to linters from other languages), and C++ codebases don't tend to have the same sprawling uses of third-party libraries that other languages do.
- Ygg2 4y agoYes? An ounce of prevention is worth a pound of cure. See Yaml safe load vs load. Since default method is unsafe due to Yaml bugs there were wide ranging consequence across most of ecosystem. If default was safe load, and you could opt-in to features of Yaml that caused unsafety it would be a much lesser problem.
- rfdonnelly 4y agoYes. Defaults matter. Here's one example https://blogs.iadb.org/ideas-matter/en/organ-donation-changing-default-can-save-lives https://blogs.iadb.org/ideas-matter/en/organ-donation-changi....