Open ugexe opened 4 years ago
I’m not concerned that this is a practical issue. In fact the Nix infrastructure for Perl 5 entirely omits ::, so JSON::XS becomes JSONXS, and they seem to be doing fine. :)
they seem to be doing fine
I guess. But consider that at least 50% of the people who have already commented in this issue would be affected by that perl naming convention, so how practical an issue that is may depend on who you are.
https://metacpan.org/pod/Text::Levenshtein::XS https://metacpan.org/pod/Text::LevenshteinXS
I just realized no mangling should be necessary at all for the attributes on raku-nix, since we can simply double quote all the names, like we already do with if
. You would write raku."Cro::HTTP"
.
Mangling is still necessary for derivation names, but those are not semantically important anyway. They are purely informational, to quickly identify Nix store paths.
The ones that are already there (default.nix is still small since I don’t generate it automatically yet), I will keep for now as aliases, for backwards compatibility.
-
is valid in an identifier, and thus it cannot 100% reliably be used to normalize names.--
is not a valid identifier, and thuss/::/--/g
is technically the superior naming convention.Admittedly the former is more common in other languages than the later. But that dichotomy would appear to be because its more common to now allow
-
in identifiers.I don't know if the round-tripping actually matters for you, but the
-
issue still remains since querying for literalFoo-Bar
module should not find aFoo::Bar
module.