you are viewing a single comment's thread
view the rest of the comments
[–] [S] 2 points 3 years ago (1 child)

If you look at Rust for example, then you specify the Traits instead. So, you could define a trait that defines the properties for birth, another to define if the animal have a beak, and another one to define the number and type of legs. The each animal implement these traits, which then properly can define a duck, cat and a platypus.

  • source
  • parent
  • hideshow 2 child comments