3 ms·
For me, personally, I’ve learned to use the right tool for the job. In some cases, it’s OOP, in some cases, it might be something like FP, or Protocol-Oriented
by ChrisMarshallNY 3y ago
For me, personally, I’ve learned to use the right tool for the job.
In some cases, it’s OOP, in some cases, it might be something like FP, or Protocol-Oriented Design.
I write in Swift, which supports all of the above. It’s been a while, since I’ve worked with C++, but I have heard that the modern version of the language similarly supports multiple paradigms.
For the frontend, if I am writing for UIKit, I use OOP, and fairly standard MVP, as that is exactly what the framework was designed to afford. I haven’t done much SwiftUI, but I suspect that I’ll be using a lot less OOP, when I do.
On the server end, I tend to use good ol’ PHP. It’s not an especially good OOP language, but I find that OOP isn’t as relevant for my backend work. That work tends to look a lot like very old-fashioned Structured Programming, which PHP is good for. As others have pointed out, I’ve found it easy to go down rabbitholes, with backend OOP.
There’s a lot to be said for an approach as an experienced, multidisciplinary professional.
It seems as if programming and software engineering pundits generally start from the premise that all [other] software developers stink, and rules and tools should be used in an effort to force them to write “good code,” as opposed to, for example, hiring smart people, and training and mentoring them to be adaptable, resourceful, disciplined engineers.
That’s nothing new. I have been seeing this for my entire [long] career. The “new hotness” changes, but the attitudes are consistent.
Here’s an old joke, from the 1980s: https://news.ycombinator.com/item?id=29345907 https://news.ycombinator.com/item?id=29345907
- kbrannigan 3y agoDo you use any framework for PHP?
- ChrisMarshallNY 3y agoNo, but if I did, it would probably be Laravel. A number of folks I highly respect, swear by it. In that case, I'd probably be using more OOP. With PHP, I tend to use OOP constructs as namespaces. My backend work is fairly humble. Most folks here, would laugh at it, but it works really, really well.