News for hackers. Stuff that matters.
Re:On the evolution of programming style: How far C++ has mo... by cbsmith on Monday March 26, 2012 @05:23PM (#3758710)
Honestly, given the problem context, a function is obviously the way to go. There isn't enough other context to give you a guideline for having an object model.

In a larger context, you might want to actually have an object/struct that represents a quadratic equation. The weird thing though was having an object for a quadratic equation and not having another object for its root (or more likely, either have a binomial class or just one generic polynomial class). I'm trying to think of a context where that makes any sense at all... and not finding it.

There are no comments on this comment yet.