# Unreal Engine Docs Authors - Coding Standard (Highlights) ![rw-book-cover|256](https://readwise-assets.s3.amazonaws.com/static/images/article4.6bc1851654a0.png) ## Metadata **Cover**:: https://readwise-assets.s3.amazonaws.com/static/images/article4.6bc1851654a0.png **Source**:: #from/readwise **Zettel**:: #zettel/fleeting **Status**:: #x **Authors**:: [[Unreal Engine Docs Authors]] **Full Title**:: Coding Standard **Category**:: #articles #readwise/articles **Category Icon**:: 📰 **URL**:: [docs.unrealengine.com](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/CodingStandard/) **Host**:: [[docs.unrealengine.com]] **Highlighted**:: [[2022-03-18]] **Created**:: [[2022-09-26]] ## Highlights - Type names are prefixed with an additional upper-case letter to distinguish them from variable names. - Functions that return a value should describe the return value. The name should make clear what value the function will return. - <atomic>: should be used in new code and old migrated when touched. Atomics are expected to be implemented fully and efficiently on all supported platforms. Our own TAtomic is only partially implemented, and it isn't in our interest to maintain and improve it. - <type_traits>: should be used where there's overlap between a legacy UE trait and a standard trait. - <initializer_list>: must be used to support braced initializer syntax. - <regex>: may be used directly, but its use should be encapsulated within editor-only code. - <limits>: std::numeric_limits can be used in its entirety. - <cmath>: only the floating point comparison functions from this header may be used, as listed here. - You shouldn't use auto in C++ code, although a few exceptions are listed below. - Range-Based for This is preferred to keep the code easier to understand and more maintainable. - Explicit captures should be used rather than automatic capture ([&] and [=]). - By-reference capture and by-value capture of pointers (including the this pointer) can cause accidental dangling references, if execution of the lambda is deferred. - By-value capture can be a performance concern if it makes unnecessary copies for a non-deferred lambda. - Accidentally captured UObject pointers are invisible to the garbage collector.Automatic capture captures this implicitly if any member variables are referenced, even though [=] gives the impression of the lambda having its own copies of everything.