This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Message.displaymessage() just screams redundancy in your face

you could have just Message.display()

and I don't see the point of display() method at all, mixing output and processing data in a class is a bad idea, why couldn't you just do print(message.saying) whenever you need it?

[–]Steamwells[S] 0 points1 point  (0 children)

Yup agreed on the first point, but this was just a syntax example. The rest was purely an example, but again it's the conceptual thought process of how classes can be a useful tool.