3 ms·
I think it boils down to thinking in composition (x has a y) vs inheritance (x is a y). I’m happy about protocols because most of the times, coming up with some
by pgorczak 5y ago
I think it boils down to thinking in composition (x has a y) vs inheritance (x is a y). I’m happy about protocols because most of the times, coming up with some pattern or order of inheritance using ABCs really feels beside the point of what I’m trying to achieve (stating that an object _has_ a specific set of attributes).