Whether you implement methods with traits or not, you can not redefine existing ones, and can still define new methods later. Since no methods defined in a trait can access or refer to the datatype or anything associated with it, what purpose or patterns do traits have? Even if defining with macros, why not just implement methods instead of traits?
Aucun commentaire:
Enregistrer un commentaire