[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-701208-105":59,"doc-detail-701208-en":130,"doc-similar-701208":171},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","back-to-the-basics-namespaces-101-meeting-c-best-practices","Back to the basics - Namespaces 101 - Meeting C++ - Best Practices","","Back to the basics: Namespaces 101 presents practical guidance for using C++ namespaces to build cleaner, more maintainable code. It explains why namespaces matter for organizing code into logical units, avoiding name collisions, improving modularity, and supporting scalable architecture. The talk covers namespace evolution from C++98 through C++11 inline namespaces, then details mechanics, scope rules, and best practices for real-world scenarios such as large internal APIs and clear module boundaries.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/back-to-the-basics-namespaces-101-meeting-c-best-practices/701208/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/back-to-the-basics-namespaces-101-meeting-c-best-practices/701208.png","ImageObject",300,407,{"name":92,"@type":93},"Boyslovefans","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why are namespaces useful in C++ code organization?","Question",{"text":112,"@type":113},"Namespaces organize code into logical units, reduce naming conflicts, and improve modularity and readability. They also support scalable architecture by defining clear module boundaries.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What key features did namespaces have when introduced in C++98?",{"text":117,"@type":113},"C++98 provided name collision prevention, logical grouping, and scope control. It also introduced the std namespace and mechanisms like the using directive and using declaration.",{"name":119,"@type":110,"acceptedAnswer":120},"How do C++11 inline namespaces help with versioning?",{"text":121,"@type":113},"Symbols in an inline namespace are treated as if they belong to the enclosing scope, making versioning simpler. The latest version can be used directly, while older versions remain accessible.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},701208,1794524169,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":34,"preview_urls":145},1374410101428,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","Back to the basics: Namespaces 101  \nSandor Dargo  \nMeeting C++  \n7th November 2025, Berlin (Germany)  \nTW ITT E R @SandorDargo [W E B](W E B sandordargo.com)[ sandordargo.com](W E B sandordargo.com)  \n2  \nWho Am I?  \nSándor DARGÓ  \nSenior Engineer at Spotify Enthusiastic blogger: [sandordargo.com](sandordargo.com)[ ](sandordargo.com)Curious oenophile  \nFortunate father of two  \nWhy this talk?  \nNamespaces are a great tool for a cleaner organization  \nThey are often overlooked in terms of usage and teaching  \nWant to share some best practices I wish I was shared  \n3  \nAgenda  \nIntroduction to Namespaces  \nEvolution of Namespaces  \nNamespace Mechanics and Scope Rules Best Practices for using namespaces  \n4  \nIntroduction to Namespaces  \nNamespace Evolution  \nIntroduction to Namespaces  \nNamespace Mechanics and Scope Rules  \nBest Practices  \n5  \nA tool for better code organization  \nOrganizes code in logical units  \nReduces the risk of naming conﬂicts  \nImproves modularity and readability  \nSupports scalable architecture  \n6  \nReal-World Problems Namespaces Solve  \nLimits name collision between diﬀerent libraries  \nHelps managing large (internal) APIs  \nHelps creating clear boundaries for modules  \n7  \nIntroduction to Namespaces  \nNamespace Evolution  \nNamespace Evolution  \nNamespace Mechanics and Scope Rules  \nBest Practices  \nNamespaces were introduced by C++98  \nAlready provided most features:  \nName collision prevention Logical grouping  \nScope control  \nThe std namespace  \nThe using directive and declaration  \n\\#include \u003Ciostream> namespace lib { int value = 42; void printValue() {  \nstd::cout \u003C\u003C \"value: \" \u003C\u003C value \u003C\u003C ‘\\n’;}  \n} // namespace lib  \nint main() {  \nlib::printValue();  \nusing namespace lib; // using directive std::cout \u003C\u003C \"value: \" \u003C\u003C value \u003C\u003C ‘\\n’; using std::cout; // using declaration cout \u003C\u003C \"Hello!\" \u003C\u003C ‘\\n’;  \nreturn 0;}  \n9  \nC++11: inline Namespaces  \nSymbols in an inline NS are as if they were part of the enclosing scope  \nMakes versioning easier  \nThe inline version can be directly used  \nIdeal for the latest version  \nnamespace my_library {  \nnamespace v1 {  \nvoid printMessage() { /* … */ }} // namespace v1  \ninline namespace v2 {  \nvoid printMessage() { /* … */ }} // namespace v2  \n} // namespace my_library  \nint main() {  \nmy_library::v1::printMessage(); // v1  \nmy_library::v2::printMessage(); // v2 my_library::printMessage(); // also v2!  \n}  \n10","cbCaioW6BnWiAkZX","https://ap.wps.com/l/cbCaioW6BnWiAkZX","pdf",909905,65,"English","# Introduction to Namespaces\n## Namespace Evolution\n# Namespace Mechanics and Scope Rules\n## Best Practices","[{\"question\":\"Why are namespaces useful in C++ code organization?\",\"answer\":\"Namespaces organize code into logical units, reduce naming conflicts, and improve modularity and readability. They also support scalable architecture by defining clear module boundaries.\"},{\"question\":\"What key features did namespaces have when introduced in C++98?\",\"answer\":\"C++98 provided name collision prevention, logical grouping, and scope control. It also introduced the std namespace and mechanisms like the using directive and using declaration.\"},{\"question\":\"How do C++11 inline namespaces help with versioning?\",\"answer\":\"Symbols in an inline namespace are treated as if they belong to the enclosing scope, making versioning simpler. The latest version can be used directly, while older versions remain accessible.\"}]","Back to the basics - Namespaces 101 - Meeting C++ - Best Practices | PDF",164,[146,150,153,157,160,164,168],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/f9b9217cc58819701eee2c0fedfa07c5.webp",983,552,{"page_no":14,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/162d1de256b74c2770b20abdaf9f7107.webp",982,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/9f78d7ff37424fda411cb93f2a6c3339.webp",981,551,{"page_no":19,"url":158,"width":159,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/da08aab78261a0604f2c1e8c3f5b183a.webp",980,{"page_no":24,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4881442e56cc12cb0fe9c4249106e834.webp",979,550,{"page_no":29,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/f8550bdb9f40ad8092df05b403147297.webp",978,549,{"page_no":34,"url":169,"width":170,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/c2e28bc901fb166cae5271796e02f58a.webp",977,{"list":172,"token":66},[173,180,186,192,198,204,210,216,222,228],{"doc_id":174,"doc_title":175,"file_type":137,"home_preview_img_url":176,"slug":177,"view_count":178,"category_name":30,"create_tm":179},673532,"How to Design a Good API and Why it Matters","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229990908572/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=L2h6out0ANEtc5c3vwUP0vj%2F%2BHI%3D","how-to-design-a-good-api-and-why-it-matters",18,1793647803,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":29,"category_name":30,"create_tm":185},685646,"Programming 101 - Introduction - Programming Basics for FIRST Robotics Competition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999685569/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=NbU9xUR9T6tJhJSN0yQhR%2BqT600%3D","programming-101-introduction-programming-basics-for-first-robotics-competition",1794016318,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":24,"category_name":30,"create_tm":191},705082,"The C# Player's Guide - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230015594599/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=K5y2rMqMBx27HU9MH5%2B64dWGYuQ%3D","the-c-players-guide-read-online-free",1794682974,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":39,"category_name":30,"create_tm":197},492839,"CSS Style Guide - Best Practices for Development","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229928709601/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=ip2FQ8OB7OcguOv1YQMWn8S25qs%3D","css-style-guide-best-practices-for-development",1790870871,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":19,"category_name":30,"create_tm":203},693076,"ROS C++ STYLE GUIDE - Version 1 - style guide instructions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230004260684/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=fogxpcEw0%2B9PTkeHEmLLukqy18M%3D","ros-c-style-guide-version-1-style-guide-instructions",1794248313,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":19,"category_name":30,"create_tm":209},698071,"Local Development Environment for Kubernetes using Minikube","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010182043/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=Kmb5IFPXD7UWaYMxJGEqTEOEBJE%3D","local-development-environment-for-kubernetes-using-minikube",1794447840,{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":41,"category_name":30,"create_tm":215},116643,"Ultimate Data Engineering Design Patterns - Design and Build Scalable Data Pipelines Using Proven Patterns for Modern Data Platforms","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834347922/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=CDpODv0ZBwWld%2BQJjJJiHe2YnAc%3D","ultimate-data-engineering-design-patterns-design-and-build-scalable-data-pipelines-using-proven-patterns-for-modern-data-platforms",1785661364,{"doc_id":217,"doc_title":218,"file_type":137,"home_preview_img_url":219,"slug":220,"view_count":24,"category_name":30,"create_tm":221},682224,"Python PEP8 - The Style Guide for Python Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999427682/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=tQaMKOipUZYtOsR8oBGnQsy3L0Y%3D","python-pep8-the-style-guide-for-python-code",1793963024,{"doc_id":223,"doc_title":224,"file_type":137,"home_preview_img_url":225,"slug":226,"view_count":81,"category_name":30,"create_tm":227},685847,"R Markdown - An Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999698626/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=oeLddsH8MKw3x%2BBTnmnykF89MmQ%3D","r-markdown-an-introduction",1794019543,{"doc_id":229,"doc_title":230,"file_type":137,"home_preview_img_url":231,"slug":232,"view_count":24,"category_name":30,"create_tm":233},690326,"Infineon TriCore™ Software Development Toolset Highlights - Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002625533/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796156699&Signature=oJk6hyO%2F6RpSDtJD9p6TTslilO4%3D","infineon-tricore-software-development-toolset-highlights-overview",1794163194]