Hydroper commented on issue #100: Literal string to identify package public 
namespace
URL: https://github.com/apache/royale-compiler/issues/100#issuecomment-560565835
 
 
   The purpose would be to improve readability in large programs. In C# or Rust 
you have these directives:
   
   ```rust
   use foo::lib::utils as qux;
   ```
   
   ```C#
   import Qux = Foo.Lib.Utils;
   ```
   
   In ActionScript, because there is not something like `import qux = 
foo.library.utils.*`, programs where scope has lexical conflicting names (like 
`package1.Item` and `package2.Item`) the programmer must use the fully 
package-qualified names.
   
   For certain compiler writting methods, it is good, for instance, to know 
what belongs to semantic data model and what belongs to bytecode structure. (In 
my mind, I reflect names such as `sem::Activation`, `bc_ns::MetaData`).
   
   > The code that determines if two namespaces are equal requires that the 
"kind" of both namespaces is also equal. So, a namespace defined in 
ActionScript code (`ABCConstants.CONSTANT_Namespace`) can never be equal to a 
package namespace (`ABCConstants.CONSTANT_PackageNs`).
   
   For most cases, when namespaces are represented as heap objects, pooling 
explicit namespaces (except these of anonymous identity such as `namespace ns`) 
and comparing by reference should work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to