mapbox / mapbox/cpp

Running list of more terms/concepts we could document in glossary

未關閉
#36 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

glossary
主要語言
沒有語言資料
星號
110
分支
17
PR 合併指標
30 天內沒有已合併 PR

描述

The glossary is developing quickly into a pretty solid resource for the key terms you'll encounter and need to know while learning C++ at Mapbox. Or when starting to teach colleagues about how we write, deploy, and approach C++ at Mapbox.

While the glossary says explicitly that It is not intended to be a complete reference on language or syntax terms, there is much more we can do. This is a ticket to brainstorm additional concepts, terms, and keywords that are potential things to cover in the glossary and related docs.

Most of these terms don't need to be defined in the glossary, rather it would be sufficient to simply list them and links to external resources (particularly style guides we support). The overall goal is 1) note they are important to understand for C++ development a mapbox (by their presence), and 2) provide a great resource to learn more about them. We can add extra definitions where our opinions matter.

(Will be editing this in place as I collect ideas)

Key learning concepts
  • the idea of a main function in an executable
  • how to pass arguments to a C++ program and parse them - refs #35
  • const
  • const char* vs std::string and how they relate
  • pointers vs references
  • dereferencing pointers
  • taking the address of a variable
  • header guards vs #pragma once
  • learning the cpp preprocessor
  • what are templates and when to use them
  • global variables, why not to use them, when they are appropriate
  • when to use static_cast, reinterpret_cast, and const_cast. Why to use them rather than c style cases
  • how enumerations work enum in C++11. Using casts to change between them and integer types
  • the max size of numeric types. using <limits> from the stdlib to know these sizes dynamically
  • integer overflow. When it is undefined behavior, when it is defined. How to control it/prevent it. How it differs for signed types and unsigned types
  • compiler warnings. how to avoid them, fix them, appropriately suppress them. Why, when starting projects, it makes sense to use -Werror and very aggressive warnings, even -Weverything
  • how to use c++ exceptions: why to always make custom exceptions subclass std::exception. How to catch all types by catching std::exception. Why to catch exceptions by const&.
  • when to avoid throwing exceptions due to performance concerns (e.g. in tight loops)
  • what is garbage collection
  • What is reference counting
  • Why, when, and how to use std::unique_ptr vs std::shared_ptr
  • zero copy
  • Big takeaways of C++11 vs C++14 vs c++17
  • move semantics / universal references
  • considerations on when to use std::vector vs std::map vs std::list
  • binary size, why it matters, how you can learn about it (https://github.com/google/bloaty)
  • What is the _GLIBCXX_USE_CXX11_ABI flag on linux and why does it matter?
Advanced performance concepts

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 glossary.md 開始,檢視現有的 C++ 概念與外部資源提案清單。這個 issue 比較像是一份開放式腦力激盪紀錄,而不是一項明確定義的文件工作;若要完成它,就需要縮小範圍,並就要新增哪些術語或連結達成共識。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
documentation
Issue 類型
文件
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。