Please do not post any internal, closed source snippets on this public issue tracker!
Purpose
Please describe the end goal you are trying to achieve that has led you to request this feature.
We need to ensure that dynamic variable names don't conflict across libraries.
Suggested approaches
What have you tried, and how might this problem be solved?
The convention will be that a package located at //import-path will own names matching @{{import-path}anything}. For instance, github.com/foo/bar/my/path/stuff.arrai will own @{{github.com/foo/bar/my/path/stuff}.something}. Within a package, @{{}...} will be an alias for @{{self-import-path}...}.
Packages may also define private names as follows: @{.{import-path}...}. Only the package in question will have permission to directly reference such names. By convention, this will expressed as @{.{}...}.
Sharing of private names between packages will be supported by simply allowing partial import paths, e.g. the following will be reference-able within github.com/foo/bar/my/path/stuff.arrai:
@{.{github.com/foo/bar/my/path/stuff}.something}
@{.{github.com/foo/bar/my/path}.something}
@{.{github.com/foo/bar/my}.something}
@{.{github.com/foo/bar}.something}
As observed earlier, by convention, relative-referencing will be used in practice:
Please do not post any internal, closed source snippets on this public issue tracker!
Purpose
We need to ensure that dynamic variable names don't conflict across libraries.
Suggested approaches
The convention will be that a package located at
//import-path
will own names matching@{{import-path}anything}
. For instance,github.com/foo/bar/my/path/stuff.arrai
will own@{{github.com/foo/bar/my/path/stuff}.something}
. Within a package,@{{}...}
will be an alias for@{{self-import-path}...}
.Packages may also define private names as follows:
@{.{import-path}...}
. Only the package in question will have permission to directly reference such names. By convention, this will expressed as@{.{}...}
.Sharing of private names between packages will be supported by simply allowing partial import paths, e.g. the following will be reference-able within
github.com/foo/bar/my/path/stuff.arrai
:@{.{github.com/foo/bar/my/path/stuff}.something}
@{.{github.com/foo/bar/my/path}.something}
@{.{github.com/foo/bar/my}.something}
@{.{github.com/foo/bar}.something}
As observed earlier, by convention, relative-referencing will be used in practice:
@{.{/my/path/stuff}.something}
(also@{.{}.something}
)@{.{/my/path}.something}
@{.{/my}.something}
@{.{/}.something}