General information
Category:
Coding, syntax & commands
Environment versions
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Virtual environment:
VMWare
>>>Why use classes? Procedural code gets the job done, right?
>>
>>Classes are for when there's data that must travel with the code. No point using a class for a bunch of functions that don't share data.
>>
>>Tamar
>
>I've you're talking about VFP classes, OK. If you mean classes in general and the foundations of OOP, that's a different story and I would disagree. They can work with the implementation of interfaces. If that last statement you made were true across all of OOP arenas, then certain frameworks would really never exist. :)
Yep, classes to implement interfaces make sense, too. I've done that, but rarely enough that it didn't come to mind.
Anyway, I'm happy to modify my original comment to say that in VFP, there's no point using a class for a bunch of functions that don't share data, unless you're implementing an interface. The point I'm trying to make is that putting a bunch of functions, even related functions, into a class simply to have them together isn't, in my view, a good approach.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only