Quote:Original post by Helter Skelter
Regardless, programming languages have nothing to do with bad design.
You're telling me that classes should never have a lot of functions that do several different things. Why not? If a character can kick, throw knives, and jump, then I need three classes? You're reasoning is not realistic. Perhaps with your file parser, but not with my project. There's no way I can divide to the level you're suggesting.
Quote:Quote:If there were a way to group functions by purpose, it would be much more manageable. Or at least I would think so.
Ummmm...that's what classes are for.
Then what represents a single entity? I just want a money wrapper. You're telling me to give 20s to one guy, 50s to another, and 100s to someone else. It doesn't make sense. It's all my money, I just want to organize it. I just don't have enough pockets.
Quote:that depends. If the string functions can be considered general purpose they will most likely end up in a utility class, string class, or in their own little section of the program. Support for strings is broad enough that they in all likelyhook belong elsewhere.
I'm trying to tell you that the functions are directly linked to the class. They are class functions. You're telling me that a class can have functions that only do one thing? A file class can open and close, but never read or write? Those are two different groups of functions, and both belong in the file class. I've seen the same pattern in standard code, in Microsoft code, and in libraries. One class has many functions, yet you could almost always split those functions into four or five groups.
The nested cass idea is a nice suggestion, but it's not really what I want. Perhaps if it could be wrapped up into a very simple management process. But it can't. The inside class methods need lots of help to interact with.. itself, in this case, on the outside.
[Edited by - Jiia on July 22, 2005 2:37:49 AM]