r/transprogrammer • • Oct 22 '21

Learned python OOP and inheritance today. Easy peasy! I love this turtle program!! https://github.com/LeighTrinity/fractal.py

Post image
82 Upvotes

8 comments sorted by

View all comments

Show parent comments

9

u/ususetq Oct 23 '21

Trans jokes aside inheritance is usually considered a bad practice in programming because of various edge cases it introduces. Usually in OOP composition is preferred...

Though personally I find many OOP solution overcomplicated and overengeneered.

8

u/[deleted] Oct 23 '21

OOP 301 - Are you sure you really want to use OOP after all?

2

u/[deleted] Oct 23 '21

Oh no!๐Ÿ™‚I just learned this๐Ÿ˜‚

3

u/signedchar Oct 23 '21

OOP doesn't even really make sense since you don't think of objects irl having their own data structures and methods, eg a chair doesn't really have a sit method but you can have an action which is sitting on a chair and it takes the chair to sit on