From ab2f86dc30ae6453954f1933f5c528a98e8c5a1f Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 18 Mar 2022 14:45:58 +0100 Subject: [PATCH] Mention tab-completion in the README. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4ad7140..24d2afe 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,16 @@ Enum type Fruit.FruitEnum <: Enum{Int32} with 1 instance: Fruit.Apple = 0 ``` +Since the instances are scoped into a module, tab-completion is obtained "for free", +which helps a lot with discoverability of the instance names: + +```julia +julia> @enumx Fruit Apple Banana + +julia> Fruit. +Apple Banana T +``` + Since the only reserved name in the example above is the module `Fruit` we can create another enum with overlapping instance names (this would not be possible with `Base.@enum`):