On Tue, 23 Oct 2018, Riccardo (Jack) Lucchetti wrote:
On Wed, 24 Oct 2018, oleg_komashko(a)ukr.net wrote:
>> With an underscore rather than a dot, yes.
> I fear, this can introduce a new mess
> I think there should be unique separator,
> e. g. pkg_name::fun_name, or something
> of this kind
I'm with Oleh on this one.
Oleh originally proposed pkg_name.fun_name. My initial response was
just based on the fact that this would currently be illegal. Aside
from '.' as decimal point (a context that is easily distinguished),
'.' in hansl is reserved for bundle membership. Punctuation
characters are scarce, and much in demand for use as operators and
other syntactic elements.
It's true, if you double up such a character, as in "::", you get
something that is not acceptable in general, and so could be given a
special syntactical import. Then we would have to distinguish
between "valid identifier for hansl object in general" and "valid
identifier for a function inside a package". Not impossible but an
extra layer of complication.
Oleh says that my suggestion -- namely, "pkgname_funname" -- could
"introduce a new mess". I don't see that. Since underscore is
accepted in all hansl identifiers my suggestion does not distinguish
with 100% confidence between a name given to a function within a
package and a name that happens to be identical in both components
and copula, given to some "random" user-function. But the confidence
is surely not far off 100%, if the package has a reasonably specific
name. And whatever the collision probability, it would certainly be
reduced, never increased, if package-writers were to follow a
recommendation to prepend "<pkgname>_" to their function names.
Allin