tk3369 / BinaryTraits.jl

Can do or not? It's easy. See https://tk3369.github.io/BinaryTraits.jl/dev/
MIT License
53 stars 3 forks source link

Make as/prefix/with clauses optional #5

Closed tk3369 closed 4 years ago

tk3369 commented 4 years ago

Here's a sample usage of the @trait macro:

@trait FlySwim as Ability prefix Can,Cannot with Fly,Swim

The issue is that you cannot specify the prefix-clause without the as-clause, and you cannot specify the with-clause without the prefix-clause. It would be nice if the as-clause, prefix-clause, and with-clause are all optional.