3 ms·
The former isn't how most OOP languages do it and those two options aren't the only two options. Personally, as someone who mainly uses Clojure, I would rather
by dkersten 6y ago
The former isn't how most OOP languages do it and those two options aren't the only two options.
Personally, as someone who mainly uses Clojure, I would rather type:
(blocked-by? user other-user)
With that said, it really doesn't matter which of these options I have to type, because as usual, the syntax is less important than the semantics and all of these options can work with or without OOP. Now, OOP isn't bad per se, its just a tool. It depends on how you use it.
I do buy into the Clojure notion though that there is a problem with most OOP languages and that is that they conflate multiple concerns and features into objects. Give me the features to mix and match as I please, instead. That is, if I want to keep my data and my functions together, great, but if I don't, also great. If I want to do polymorphism with objects, great, if I want to do it without, also great. Let me choose, based on the problem I'm solving.
I tend to favour a functional-first approach, but will use OOP as it makes sense or when it makes the API easier. To me, immutable state (where possible) is more important than an avoidance of OOP. I also write a lot of C++ and I won't shy away from creating some classes where it makes sense.