#이 시리즈를 쓰는 이유
표준 라이브러리를 안다고 industrial C++를 안다고 말할 수 있을까. Google이 사내 수억 줄의 C++ 코드를 떠받치는 Abseil은 std에 없는 부분, std가 부족한 부분, std보다 빨라야 하는 부분을 채워 넣은 라이브러리다. 이 시리즈는 Abseil의 컴포넌트를 단순히 사용법으로 훑지 않는다. Google이 사내 코드 리뷰에서 무엇을 보는가, 즉 왜 이 API가 이 모양인지, 언제 쓰고 언제 피해야 하는지를 함께 본다.
production C++를 읽고 쓰는 사람에게 Abseil은 두 번 마주친다. 한 번은 자기 코드가 의존하는 라이브러리로, 다른 한 번은 코드 리뷰에서 “이 부분은 absl::StatusOr를 써라”는 코멘트로. 그 두 번째 마주침을 미리 준비하는 시리즈다.
#대상 독자
- C++ 중급 이상 — std::vector, std::unique_ptr, std::optional에 익숙한 사람
- production 코드를 읽고 리뷰해야 하는 시니어 엔지니어
- Bazel 또는 CMake로 Abseil을 도입한 팀의 새 멤버
- “absl::StatusOr는 std::optional과 뭐가 달라?”가 궁금한 사람
C++ 초심자는 먼저 Effective Modern C++ 시리즈를 권한다.
#시리즈 구성
총 13 Parts × 68편으로 구성된다.
| Part | 제목 | 핵심 | 편수 |
|---|
| 1 | Foundations | 설계 철학, 빌드, 릴리스 모델 | 5 |
| 2 | Base · Meta · Memory | macro, type_traits, raw_logging | 8 |
| 3 | Status / StatusOr | exception-free 에러 처리 | 5 |
| 4 | Strings | StrCat, StrSplit, string_view | 8 |
| 5 | Container (Swiss Table) | flat_hash_map, btree_map | 7 |
| 6 | Synchronization | absl::Mutex, Notification | 5 |
| 7 | Time / Duration / CivilTime | 단단한 type 기반 시간 | 5 |
| 8 | Random | BitGen, distributions | 4 |
| 9 | Numeric / Types / Utility | int128, optional, variant, span | 8 |
| 10 | Hash framework | AbslHashValue, HashState | 3 |
| 11 | Log / Check | LOG, CHECK, sinks | 4 |
| 12 | Flags | ABSL_FLAG, ParseCommandLine | 3 |
| 13 | Code Review Patterns | Google style, anti-patterns, 마이그레이션 | 3 |
#Part 1 — Foundations (5)
Abseil이 왜 존재하는지, 어떻게 빌드하는지부터.
| # | 글 제목 |
|---|
| 1-01 | Abseil 개요 — Google이 만든 이유, std::보완 |
| 1-02 | Design philosophy — std 호환 + 추가 기능 |
| 1-03 | Build & dependency (Bazel vs CMake) |
| 1-04 | LTS vs HEAD release model |
| 1-05 | Versioning & ABI 호환성 |
| # | 글 제목 |
|---|
| 2-01 | ABSL_HAVE_* / ABSL_ATTRIBUTE_* macros |
| 2-02 | ABSL_PREDICT_TRUE/FALSE (branch hint) |
| 2-03 | ABSL_LOG_SEVERITY |
| 2-04 | type_traits (negation, conjunction, void_t) |
| 2-05 | Conformance & policy |
| 2-06 | Memory utilities |
| 2-07 | raw_logging (무의존 환경) |
| 2-08 | thread_annotations (clang TSA) |
#Part 3 — Status / StatusOr (5)
| # | 글 제목 |
|---|
| 3-01 | absl::Status — exception-free error handling |
| 3-02 | StatusOr<T> — 값 또는 에러 |
| 3-03 | status_macros (ASSIGN_OR_RETURN, RETURN_IF_ERROR) |
| 3-04 | Status payload (구조화된 에러) |
| 3-05 | Status에서 exception까지 — 변환 패턴 |
#Part 4 — Strings (8)
| # | 글 제목 |
|---|
| 4-01 | string_view 개요 |
| 4-02 | string_view 함정과 best practices (lifetime) |
| 4-03 | StrCat (vs operator+, ostringstream) |
| 4-04 | StrSplit (Iterator, predicate) |
| 4-05 | StrJoin |
| 4-06 | StrFormat (type-safe printf) |
| 4-07 | ascii functions (AsciiStrToLower 등) |
| 4-08 | Escaping — CHexEscape, WebSafeBase64 |
#Part 5 — Container (Swiss Table) (7)
| # | 글 제목 |
|---|
| 5-01 | flat_hash_map vs std::unordered_map (Swiss Table) |
| 5-02 | flat_hash_set |
| 5-03 | node_hash_map (stable pointer) |
| 5-04 | btree_map (sorted, B-tree) |
| 5-05 | FixedArray (stack-allocated) |
| 5-06 | InlinedVector |
| 5-07 | Swiss Table internals (SIMD probing) |
#Part 6 — Synchronization (5)
| # | 글 제목 |
|---|
| 6-01 | absl::Mutex vs std::mutex |
| 6-02 | Conditional critical section |
| 6-03 | Notification |
| 6-04 | BlockingCounter / Barrier |
| 6-05 | Mutex annotations (clang thread safety) |
#Part 7 — Time / Duration / CivilTime (5)
| # | 글 제목 |
|---|
| 7-01 | Time / Duration overview (단단한 type) |
| 7-02 | Format / Parse |
| 7-03 | CivilTime |
| 7-04 | time_zone |
| 7-05 | Time mocking (테스트 친화) |
#Part 8 — Random (4)
| # | 글 제목 |
|---|
| 8-01 | BitGen |
| 8-02 | Distributions (Uniform, Exponential 등) |
| 8-03 | Mocking random |
| 8-04 | Seeding & entropy |
#Part 9 — Numeric / Types / Utility (8)
| # | 글 제목 |
|---|
| 9-01 | int128 / uint128 |
| 9-02 | bits (popcount, countl_zero) |
| 9-03 | absl::optional (vs std) |
| 9-04 | absl::variant |
| 9-05 | absl::span |
| 9-06 | absl::any |
| 9-07 | absl::compare (three-way) |
| 9-08 | utility (apply, in_place 등) |
#Part 10 — Hash framework (3)
| # | 글 제목 |
|---|
| 10-01 | AbslHashValue |
| 10-02 | HashState chaining |
| 10-03 | Custom hashable |
#Part 11 — Log / Check (4)
| # | 글 제목 |
|---|
| 11-01 | LOG, VLOG, CHECK |
| 11-02 | LogSink |
| 11-03 | LogEntry / structured logging |
| 11-04 | Stack trace / failure_signal_handler |
#Part 12 — Flags (3)
| # | 글 제목 |
|---|
| 12-01 | ABSL_FLAG 정의 |
| 12-02 | ParseCommandLine |
| 12-03 | Flag introspection / validation |
#Part 13 — Code Review Patterns (3)
| # | 글 제목 |
|---|
| 13-01 | Google 스타일의 Abseil 사용 패턴 |
| 13-02 | 자주 보는 anti-pattern |
| 13-03 | std → absl 마이그레이션 전략 |
#자매 시리즈
이 시리즈와의 차이: 위 셋은 언어 feature를 다루고, 이 시리즈는 industrial library를 reading lens로 다룬다. Abseil은 Google이 사내 production에서 발전시킨 것이고, Folly는 Meta가 같은 일을 한 결과다. 두 라이브러리를 나란히 보면 “production C++의 합의된 패턴”이 무엇인지 보인다.
#학습 로드맵
처음부터 1편씩 순서대로 읽지 않아도 된다. 권장 순서:
- 핵심 (먼저) — Part 3 (Status), Part 4 (Strings), Part 5 (Container). production C++에서 가장 자주 보는 세 영역.
- synchronization 다루는 사람 — Part 6, Part 7 추가.
- 시스템 코드를 쓰는 사람 — Part 2 (Base · Meta · Memory) — macro와 attribute로 portability를 확보하는 방법.
- 마지막에 — Part 8 (Random), Part 10 (Hash), Part 12 (Flags) 같은 비주류 module.
- Part 13 — 모든 Part를 본 후 — code review 패턴의 메타.
#관련 항목