3 ms·
> My own feeling is that object-oriented programming is a useful technique in some cases, but it isn't something that has to pervade every program you write. T
by jfim 8y ago
> My own feeling is that object-oriented programming is a useful technique in some cases, but it isn't something that has to pervade every program you write.
That could apply to pretty much any programming paradigm.
I wouldn't use object oriented programming for small programs. Why bother with types when you can express things in a couple hundred lines of python with functions? Why write classes to munge some data that could be better expressed as a series of map/fold/etc. on lists of tuples?
However, for keeping large codebases approachable and maintainable, OOP is the best paradigm I have personally seen.
- ChrisSD 8y agoIt depends what you mean by OOP. If you're talking about class orientated program (aka everything is a class) then I disagree. That can get painful to maintain in large applications, especially when concurrency becomes important.
- fuzzy2 8y ago> I wouldn't use object oriented programming for small programs. Why bother with types when you can express things in a couple hundred lines of python with functions? Hm? Types don't require OO. Even your 100 line program can benefit from type checking. Approachable code must be structured in a meaningful way. That doesn't require OO either.