optional
abseil-cpp
optional | abseil-cpp | |
---|---|---|
5 | 61 | |
885 | 15,740 | |
0.9% | 1.7% | |
0.0 | 9.7 | |
10 months ago | 4 days ago | |
C++ | C++ | |
Creative Commons Zero v1.0 Universal | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
optional
- Functional Programming in Modern C++: The Imperatives Must Go – Victor Ciura [video]
-
Backward compatible implementations of newer standards constructs?
For optional I would recommend Sy's implementation - optional
-
What is your preferred solution repeated nullptr checks on smart pointers
One could think of a more fluent interface to deal with smart pointers, similar to what exists in tl optional https://github.com/TartanLlama/optional
-
Assignment for optional<T>
It looks like tl::optional<>.
- Monadic interface for std::optional
abseil-cpp
- Writing your own C++ standard library from scratch
-
Don't "optimize" conditional moves in shaders with mix()+step()
Maybe you’d like ABSL_PREDICT macros?
https://github.com/abseil/abseil-cpp/blob/master/absl/base/o...
-
C++'s `Noexcept` Can (Sometimes) Help (Or Hurt) Performance
Their justification is here https://github.com/abseil/abseil-cpp/issues/720
However, I personally disagree with them since I think it's really important to have _some_ basic reproducibility for things like reproducing the results of a randomized test. In that case, I'm going to avoid changing as much as possible anyways.
-
Open Source C++ Stack
abseil.io
-
B-Trees Require Fewer Comparisons Than Balanced Binary Search Trees
From the looks of it Rust [1] uses a constant branching factor based on number of items whereas ABSEIL generally uses a target of 256 bytes for branching and fits however many elements fit within that. Rust’s approach seems to be more primitive as ABSEIL is optimizing for cache line usage (not sure why it’s several multiples of a cache line - maybe to help the prefetcher or to minimize cache line bouncing?)
[1] https://github.com/rust-lang/rust/blob/master/library/alloc/...
[2] https://github.com/abseil/abseil-cpp/blob/74f8c1eae915f90724...
[3] https://github.com/abseil/abseil-cpp/blob/74f8c1eae915f90724...
-
AI in Software Engineering at Google
From the screencast:
> implement also for Days
This fails to recognize that this is a bad feature that the Abseil library would explicitly reject (hence the existence of absl::CivilDay) [0], and instead perpetuates the oversimplification that 1 day is exactly 24 hours (which breaks at least twice every year due to DST).
Which is to say: it'll tell you how to do the thing you ask it to do, but will not tell you that it's a bad idea.
And, of course, that assumes that it even makes the change correctly in the first place (which is nowhere near guaranteed, in my experience). I have seen (and bug-reported!) cases where it incorrectly inverts conditionals, introduces inefficient or outright unsafe code, causes unintended side effects, perpetuates legacy (discouraged) patterns, and more.
It turns out that ML-generated code is only as good as its training data, and a lot of google3 does not adhere to current best practices (in part due to new library developments and adoption of new language versions, but there are also many corners of the codebase with, um, looser standards for code quality).
[0] https://github.com/abseil/abseil-cpp/blob/bde089f/absl/time/...
- Sane C++ Libraries
- Open source collection of Google's C++ libraries
- Is Ada safer than Rust?
-
Appending to an std:string character-by-character: how does the capacity grow?
Yeah, it's nice! And Abseil does it, IFF you use LLVM libc++.
https://github.com/abseil/abseil-cpp/blob/master/absl/string...
The standard adopted it as resize_and_overwrite. Which I think is a little clunky.
What are some alternatives?
variant - C++17 `std::variant` for C++11/14/17
Folly - An open-source C++ library developed and used at Facebook.
expected - C++11/14/17 std::expected with functional-style extensions
Boost - Super-project for modularized Boost
nonstd-lite - Parent of *-lite repositories, a migration path to post-C++11 features for pre-C++11 environments
EASTL - Obsolete repo, please go to: https://github.com/electronicarts/EASTL