commit | 73433d46b6c35bd4d9398a078065924fe97e1c8e | [log] [tgz] |
---|---|---|
author | Adam Barth <abarth@google.com> | Thu Jan 07 20:09:48 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jan 07 20:09:48 2021 +0000 |
tree | ed89f379bd6c7a5689988092f4f678b6d2ab9f6d | |
parent | 06ea0644c348a8b578a5b25beb90d57551e6e5d8 [diff] | |
parent | 1852eee228bb1f02b63471d4d5ba95cf81ff7c4a [diff] |
Add NOTICE file am: be15867b32 am: 6e8f6b146f am: 1852eee228 Original change: https://android-review.googlesource.com/c/platform/system/libbase/+/1538987 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2721b0cb6bbf3f0f1d82cd9e4856054577675170
This library is a collection of convenience functions to make common tasks easier and less error-prone.
In this context, "error-prone" covers both "hard to do correctly" and "hard to do with good performance", but as a general purpose library, libbase's primary focus is on making it easier to do things easily and correctly when a compromise has to be made between "simplest API" on the one hand and "fastest implementation" on the other. Though obviously the ideal is to have both.
The intention is to cover the 80% use cases, not be all things to all users.
If you have a routine that's really useful in your project, congratulations. But that doesn't mean it should be here rather than just in your project.
The question for libbase is "should everyone be doing this?"/"does this make everyone's code cleaner/safer?". Historically we've considered the bar for inclusion to be "are there at least three unrelated projects that would be cleaned up by doing so".
If your routine is actually something from a future C++ standard (that isn't yet in libc++), or it's widely used in another library, that helps show that there's precedent. Being able to say "so-and-so has used this API for n years" is a good way to reduce concerns about API choices.
Unlike most Android code, code in libbase has to build for Mac and Windows too.
Code here is also expected to have good test coverage.
By its nature, it's difficult to change libbase API. It's often best to start using your routine just in your project, and let it "graduate" after you're certain that the API is solid.