The holy traits pattern has an interesting name. Some people also call it the Tim Holy Traits Trick (THTT). As you might have guessed the pattern is named after Tim Holy, who is a long-time contributor to the Julia language and ecosystem.
What are traits? In a nutshell, a trait corresponds to the behavior of an object. For example, birds and butterflies can fly, so they both have the CanFly trait. Dolphins and turtles can swim, so they both have the CanSwim trait. A duck can fly and swim, so it has both the CanFly and CanSwim traits. Traits are typically binary – you either exhibit the trait or not – although that is not a mandatory requirement.
Why do we want traits? Traits can be used as a formal contract about how a data type can be used. For example, if an object has the CanFly trait, then we would be quite confident...