3 ms·
As someone who grew up on imperative and functional programming, I am loathe to add a class where a method will do. I hate having to open a dozen files to read
by gwillen 14y ago
As someone who grew up on imperative and functional programming, I am loathe to add a class where a method will do. I hate having to open a dozen files to read logic that would be 30 lines if it were consolidated into one method.
I suspect the 'senior developer' has similar feelings about OOP to my own; he just sounds a lot more forceful about them. I don't think either position is necessarily 'right', but he's probably not a good person for you to work with.
- mcav 14y agoEven as a functional programmer, I'd be OK with separating out comment functionality into a separate file, class or not. This code seems fine to me.
- kenrikm 14y agoRails is not my bread and butter however in iOS I find it'a almost always better to split things out into helper classes. Otherwise when you find that you end up needing that method in other parts of the app and then you either have to break it out into a class anyway or have two of the same method in two separate controllers I.E. NOT what you want. I think the OPs code looks clean and follows OOP.