What do you think of providing a shorthand for creating types that are defined just for dispatching to relevant methods. For example (https://bkamins.github.io/julialang/2020/11/27/abt.html):
abstract type ABRule end struct Greedy <: ABRule end struct Thompson <: ABRule end struct Unif <: ABRule end
abstract type PrintMode end abstract type REPLMode <: PrintMode end abstract type IJuliaMode <: PrintMode end
These two could be written down e.g. as:
structs Greedy | Thompson | Unif <: abstract type ABRule
abstract types REPLMode | IJuliaMode <: abstract type PrintMode
Here I used Haskell notation with
| as delimiter. I guess a tuple is would be more fitting here. These shortcuts could also be provided by a macro. What do you think?