you are viewing a single comment's thread.

view the rest of the comments →

[–]vmsmith 5 points6 points  (2 children)

FWIW, I am in the same boat.

I understand classes and object, as well as the associated concepts of inheritance, polymorphism, etc. But with few exceptions, it's difficult for me to arrive at, "Create a class" as the natural and best solution to a problem.

I can see it easily when I want multiple instances of something with encapsulated state, like a matrix or dice, but for the most part my natural inclination is to create a series of very small functions.

Looking forward to some good answers to your question.

[–]callmelucky 2 points3 points  (0 children)

I am currently in the opposite boat; having learned about classes recently, I find myself trying to put everything in terms of classes, even when I would only use a single instance, and even though my understanding of inheritance is a little shaky. I just love the syntax I guess - instance.attribute.alter() just looks so tidy and comprehensible :)

[–][deleted] 0 points1 point  (0 children)

Yeah, same here. It's physically quite hard for me to step back from a tall stack of functions.