Hacker News new | ask | show | jobs
by solarexplorer 1777 days ago
I have seen this a lot, am I the only one who thinks that this is ugly?

Crafting a protocol after the fact to match some class' interface (and then put an empty extension) seems just wrong.

I very much prefer to pass simple types around. (like two closures in this case) You don't need to remember any protocol name and don't need to define a ton of mock objects.