--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFCV8%3DW58EPxr-9jA86Zs%3DFa2Y5nRRaDcmCZySmNzg%2Bf5g%40mail.gmail.com.
Random should be banned, for the same rationale as the C++ standard random number engines.
PK
String Formatting: ? Can we replace base::StringPrintf() with this?
Strings Library: ? Can we replace various base/strings things with these?
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKroV01BweTSAUqa0zqy5AMi%3DjDVX8i9CV2w-dCfMHA58A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAERSRDARhybF7qZmny5%3Dzb_%3DY1o3TzESFUQOTw1A7cwhLZz_eg%40mail.gmail.com.
Strings Library: ? Can we replace various base/strings things with these?These utilities are closely coupled with the banned absl::string_view type. In particular they rely on absl::string_view as a return value. I think we should ban this as a result to avoid having absl::string_view leak into chromium code. After both chromium and absl support C++20 with std::string_view we could revisit this and likely replace some of base string utilities with absl string utilities.
Strings Library: ? Can we replace various base/strings things with these?
Synchronization: ? Can we replace anything in base/synchronization here? If not, ban
String Formatting: ? Can we replace base::StringPrintf() with this?
There's an internal C++ style thread about std::format vs. absl::StrFormat() from a couple years back; I'm not sure where this discussion would land now, but one issue raised with std::format is that it uses exceptions for error handling.
I've posted in the internal thread about StrFormat vs. std::format. For now, my weak inclination is to say we should try to auto-port from base::StringPrintf() to absl::StrFormat() (easier than auto-porting to std::format, so even if the latter is allowed, it will probably be some time coming) and allow this, but I'm not sure whether we want to "ban until someone wants to actually tackle that migration plan"?
Strings Library: ? Can we replace various base/strings things with these?
These utilities are closely coupled with the banned absl::string_view type. In particular they rely on absl::string_view as a return value. I think we should ban this as a result to avoid having absl::string_view leak into chromium code. After both chromium and absl support C++20 with std::string_view we could revisit this and likely replace some of base string utilities with absl string utilities.
Note that it is possible and easy to configure abseil to force absl::string_view to be an alias of the std::string_viewsee ABSL_OPTION_USE_STD_STRING_VIEW in
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFA4sc%3D9Cf2i_0hRv_MQecwUHWhwqanygPRw6bd5mMyLSA%40mail.gmail.com.
- Compile time validation of format strings. std::format() gets this in C++23.
- No exceptions for error handling.
Strings Library: ? Can we replace various base/strings things with these?These utilities are closely coupled with the banned absl::string_view type. In particular they rely on absl::string_view as a return value. I think we should ban this as a result to avoid having absl::string_view leak into chromium code. After both chromium and absl support C++20 with std::string_view we could revisit this and likely replace some of base string utilities with absl string utilities.Note that it is possible and easy to configure abseil to force absl::string_view to be an alias of the std::string_viewsee ABSL_OPTION_USE_STD_STRING_VIEW inRight, I forgot std::string_view is available in C++17 we just haven't migrated to it from base::StringPiece yet. There is a cxx thread and an old bug related to that. So maybe ban absl string library until std::string_view is allowed and then revisit?
I thought this was (retroactively) part of C++20, via the DR on this. Or were there further C++23-only changes?
- Compile time validation of format strings. std::format() gets this in C++23.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFAgfTAs-u_JPDGYpobspH86y-Anjrg90AcLCZbq%3D0NLsg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaTL_6L7xExVtjPFSNUG4TRvgdjYFU1%3DA3dekuzccPrD9w%40mail.gmail.com.
Yes, the smaller the usage the easier it is, but on the other hand if these types are going to be used anyway, we will have to ABSL_EXPORT them anyway when we roll Abseil every week so it is just a bit more work that gets done earlier.On this topic, I have to prioritize a bit this month but I am going to give it another push in the next few days.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFCo9kooKVB3fFeyh_%3DFUHK3EquXw9fy8epB%2BS0A815eYw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAZdMacyodVNgjK5eHv6t2wTykOP0qkDaVRBXeTmNdWcJjoWAw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKpsth-duUKipae9P8R2V0v8aiq%3D%2B_Y6%3DRPRzPUQEXvYEQ%40mail.gmail.com.
I understand that part; I am trying to understand the advantage of using expected<T, Status>, when Status is explicitly designed to be used with StatusOr and that's the idiomatic usage that's documented and people are familiar with.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFB%2BBjG%2B6j6-sMpm_Wf1%2B_%2BnDPfsu2khtFGzW_22JHmfTg%40mail.gmail.com.