Re:Is naming things really that hard?
by z3t4 on Saturday March 04, 2017 @09:00AM
(#13790899)
Don't put everything in the same object .... A file object should not be used to open files, make something else to open the file, like editor.open(file), editor.clone(file), editor.move(file) ... And the file doesn't need to have all those properties, make functions that derive from file.path like dirName(file.path), fileExtension(file.path), fileName(file.path) ... But object oriented (OOP) is not the only paradigm. Don't make classes if you don't have to. Once you have discovered OOP you tend to make everything into classes, and spend a lot of time building cloud castles.
[ Parent
| on HN ]
There are no comments on this comment yet.