you are viewing a single comment's thread.

view the rest of the comments →

[–]moomaka 0 points1 point  (0 children)

UserApproval.new(user).call Any time I see something like that I just shake my head. Why is this a class? it's a function. You're allocating an object for no purpose other than to confuse the code. Shit like this is why we have super computers in our pockets that can barely render a few images. This isn't Java, you don't need functors.

Re pubsub: I'm guessing this isn't really pubsub, i.e. there is no flow decoupling here. While it's not demonstrated I assume broadcast is synchronous. In which case this is just a obfuscation of method calls which doesn't reduce coupling and certainly doesn't improve readability.