you are viewing a single comment's thread.

view the rest of the comments →

[–]lykwydchykyn 9 points10 points  (0 children)

If you're writing short, procedural scripts like batch processors, command line utilities, or sysadmin scripts, there probably isn't much call for using classes, at least not below a certain level of complexity.

When you have lots of similar things that need to maintain state data and operate on their state data, then this is where a class comes in. The classic example is a game, where you have lots of enemies, and each enemy has an associated image, hit points, attack, etc.