hierarchical packages as namespace

0 votes
asked Nov 28, 2023 in Question / help by anonymous

Recent new feature that packages are regarded as namespace is welcomed.

I think these two examples should be the same result, but they don't.

Ex1.

package ddd {
  package aaa {
    class ccc
  }

  package bbb {
    class ccc
    ccc <|- ddd.aaa.ccc
  }
}

Ex2.

package ddd {
  package aaa {
    class ccc
  }

  package bbb {
    class ccc
    ccc <|- aaa.ccc
  }
}

Ex1 draws my expected figure.

Ex2 generates a class 'ddd.bbb.aaa.ccc' which is not expected.

​That is, 'ddd.' shouldn't be required under the namespace of 'ddd', I think. When full namespace path is needed, reusing sub contents in a package into another package will be difficult.

FYI, removing 'package ddd' from two examples above results in the same figure. This is my expected results.

Is there some good manner to use hierarchical namespaces?

As an idea, is there any way to escape a package to be part of namespace?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...