Source: Real-Time Innovations ( Gerardo Pardo-Castellote)
Programming languages that have the concept of modules/namespaces also include the concept of "using" a namespace type such that one can ommit the explicit reference to the 'used' namespace.
The following is an example for C++:
Assume the declaration:
Normally these types need to be accessed using their fully qualified names:
This can be cumbersome when having to reference a lot of types in the same namespace, specially for deep nested namespaces.
The C++ using declaration can bring the name space or individual types into scope simplifying the coding as in:
Or alternatively bringing every type in the name space into the scope:
Java and C# provide similar facilities:
In Java the "import" keyword is used to import packages or types into the scope. The syntax is:
In C# the "using" keyword is used to import namespaces or types into the scope. The syntax is:
This issue request that a similar facility is added to IDL
Reported: IDL 4.2 — Tue, 23 Jun 2020 03:14 GMT
Updated: Tue, 23 Jun 2020 12:00 GMT