Giovanni's blog just dropped the hottest take 😎: "Why not use string views instead of const& wstrings?" Because he's apparently in the business of crafting "nasty bugs" and defying rationality with #Win32 C code πŸ›πŸ€¦β€β™‚οΈ.
https://giodicanio.com/2024/05/14/why-dont-you-use-string-views-like-std-wstring_view-instead-of-passing-std-wstring-by-const-reference/ #GiovanniBlog #StringViews #CCode #NastyBugs #DeveloperHumor #HackerNews #ngated
Why Don’t You Use String Views (as std::wstring_view) Instead of Passing std::wstring by const&?

Thank you for the suggestion. But *in that context* that would cause nasty bugs in my code, and in code that relies on it.

Giovanni Dicanio's Blog