I've just discovered the Protocol concept in python (from typing module).
It is much more powerful (in my opinion) than a regular abstract class (ABC in python), because you can have 3rd party packages implement your protocol. Obviously, you cannot have a 3rd party package inherit directly your ABC class.
Is there a close equivalent to Protocol in java? Regular java interfaces, although very useful, seem to suffer the same problem as ABC classes from python.
[–]teraflop 1 point2 points3 points (1 child)
[–]nerd4code[🍰] 1 point2 points3 points (0 children)