Use of traits vs extending abstract classes #737
erikaraujo
started this conversation in
General
Replies: 1 comment 3 replies
-
Good question!
The tl;dr is: using traits + interfaces is more flexible than classic inheritance, and it's inspired by more modern languages like Go and Rust. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was reading the tempest documentation (huge fan of the framework already!) and noticed a pattern of using traits instead of simply extending abstract classes.
Examples:
I'm sure there's a reason behind this decision - I was just wondering, however, what the reason is.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions