Namespace
Return to CPP namespace - https://en.cppreference.com/w/cpp/keyword/namespace - https://en.cppreference.com/w/cpp/language/namespace - https://en.cppreference.com/w/cpp/language/namespace#Using-directives - https://en.cppreference.com/w/cpp/language/namespace_alias
- List 30 programming languages support the namespace Reserved Word. Answer in MediaWiki syntax with the URL of the official documentation for each language reference. Also list the Wikipedia URL if appropriate.
Creating a comprehensive list that covers 30 programming languages with a reserved word or concept equivalent to `namespace` is challenging because not all programming languages use namespaces or a direct equivalent concept with a reserved word. However, I'll list several languages that include `namespace` or a similar concept for organizing code and avoiding name collisions, along with their documentation and Wikipedia URLs where applicable.
- C++
- Official Documentation: s://en.cppreference.com/w/cpp/keyword/namespace
- Wikipedia URL: s://en.wikipedia.org/wiki/C%2B%2B
- C#
- Official Documentation: s://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/types/namespaces
- Wikipedia URL: s://en.wikipedia.org/wiki/C_Sharp_(programming_language)
- PHP
- Official Documentation: s://www.php.net/manual/en/language.namespaces.php
- Wikipedia URL: s://en.wikipedia.org/wiki/PHP
- TypeScript
- Official Documentation: s://www.typescriptlang.org/docs/handbook/namespaces.html
- Wikipedia URL: s://en.wikipedia.org/wiki/TypeScript
- XML
- Official Documentation: s://www.w3.org/TR/xml-names/
- Wikipedia URL: s://en.wikipedia.org/wiki/XML
- XAML
- Official Documentation: s://docs.microsoft.com/en-us/dotnet/desktop/wpf/xaml-services/namespaces
- F#
- Official Documentation: s://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/namespaces
- Wikipedia URL: s://en.wikipedia.org/wiki/F_Sharp_(programming_language)
- Visual Basic .NET
- Official Documentation: s://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/program-structure/namespaces
- Wikipedia URL: s://en.wikipedia.org/wiki/Visual_Basic_.NET
- Swift
- Documentation does not apply directly as Swift uses modules rather than namespaces. However, the concept of organizing code is similar.
- Wikipedia URL: s://en.wikipedia.org/wiki/Swift_(programming_language)
- Rust
- Official Documentation: s://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Rust_(programming_language)
- Scala
- Official Documentation: s://docs.scala-lang.org/tour/packages-and-imports.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Scala_(programming_language)
- Java
- Documentation for `package`, which serves a similar purpose.
- Official Documentation: s://docs.oracle.com/javase/tutorial/java/package/packages.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Java_(programming_language)
- Python
- Uses modules and packages as namespaces.
- Official Documentation: s://docs.python.org/3/tutorial/modules.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Python_(programming_language)
- Go
- Uses packages to organize code.
- Official Documentation: s://golang.org/pkg/
- Wikipedia URL: s://en.wikipedia.org/wiki/Go_(programming_language)
- Kotlin
- Uses packages similarly to Java.
- Official Documentation: s://kotlinlang.org/docs/packages.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Kotlin_(programming_language)
- Ruby
- Uses modules to namespace code.
- Official Documentation: s://ruby-doc.org/core-2.7.0/Module.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Ruby_(programming_language)
- JavaScript
- ES6 modules serve as namespaces.
- Official Documentation: s://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
- Wikipedia URL: s://en.wikipedia.org/wiki/JavaScript
- Clojure
- Uses namespaces in its code organization.
- Official Documentation: s://clojure.org/reference/namespaces
- Wikipedia URL: s://en.wikipedia.org/wiki/Clojure
- Erlang
- Uses modules, which can be seen as namespaces.
- Official Documentation: ://erlang.org/doc/reference_manual/modules.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Erlang_(programming_language)
- Haskell
- Uses modules as namespaces.
- Official Documentation: s://www.haskell.org/tutorial/modules.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Haskell_(programming_language)
- Lua
- Uses modules and packages.
- Official Documentation: s://www.lua.org/pil/15.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Lua_(programming_language)
- Perl
- Uses packages to create namespaces.
- Official Documentation: s://perldoc.perl.org/perlmod
- Wikipedia URL: s://en.wikipedia.org/wiki/Perl
- Dart
- Uses libraries as namespaces.
- Official Documentation: s://dart.dev/guides/libraries/create-library-packages
- Wikipedia URL: s://en.wikipedia.org/wiki/Dart_(programming_language)
- Objective-C
- Uses frameworks and header files to organize code, akin to namespaces.
- Wikipedia URL: s://en.wikipedia.org/wiki/Objective-C
- MATLAB
- Uses packages to organize functions and classes into namespaces.
- Official Documentation: s://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html
- Wikipedia URL: s://en.wikipedia.org/wiki/MATLAB
- Fortran
- Uses modules, not directly namespaces but similar in concept for organizing code.
- Official Documentation: s://gcc.gnu.org/onlinedocs/gfortran/Modules.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Fortran
- Pascal
- Uses units as a way to organize code, similar to namespaces.
- Official Documentation: s://www.freepascal.org/docs-html/ref/refsu13.html
- Wikipedia URL: s://en.wikipedia.org/wiki/Pascal_(programming_language)
```
This list includes languages that directly use a `namespace` keyword, as well as those that employ similar concepts to achieve the same goals of organizing code and preventing naming conflicts.
namespace - “Mechanism for putting names defined by a library into a single place. Namespaces help avoid inadvertent name clashes. The names defined by the C Plus Plus library | C++ library are in the namespace std.” (CppPrmLp 2012)
NamespaceCloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.
