The current spelling uses isDefault per trait to declare the default traits. This makes it hard to see which traits are actually the default traits.
Modification
Instead of using an explicit isDefault per trait this PR now uses a .defaults(enabledTraits:) overload which just uses the "default" trait under the hood. This simplifies the logic tremendously to handle default traits.
Result
Nicer spelling for default traits and easier implementation.
Motivation
The current spelling uses
isDefault
per trait to declare the default traits. This makes it hard to see which traits are actually the default traits.Modification
Instead of using an explicit
isDefault
per trait this PR now uses a.defaults(enabledTraits:)
overload which just uses the"default"
trait under the hood. This simplifies the logic tremendously to handle default traits.Result
Nicer spelling for default traits and easier implementation.