mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-28 23:55:54 +00:00
a7bff04af8
Still alias function shadows builtin function (of any arity) by name. This allows to detect argument error as such, but might be a bit inconvenient if user wants to overload heads() for example. If needed, maybe we can add some config/revset syntax to import builtin function to alias namespace. The functions table is keyed by name, not by (name, arity) pair. That's mainly because std collections require keys to be Borrow, and a pair of borrowed values is incompatible with owned pair. Another reason is it makes easy to look up overloads by name. Alias overloading could also be achieved by adding default parameters, but that will complicate the implementation a bit more, and can't prevent shadowing of 0-ary immutable_heads(). Closes #2966 |
||
---|---|---|
.. | ||
design | ||
technical | ||
branches.md | ||
cli-reference.md | ||
code-of-conduct.md | ||
config.md | ||
config.toml | ||
conflicts.md | ||
contributing.md | ||
FAQ.md | ||
filesets.md | ||
git-comparison.md | ||
git-compatibility.md | ||
github.md | ||
glossary.md | ||
index.md | ||
install-and-setup.md | ||
operation-log.md | ||
related-work.md | ||
revsets.md | ||
sapling-comparison.md | ||
templates.md | ||
testimonials.md | ||
tutorial.md | ||
windows.md | ||
working-copy.md |