4 ms·
They are, but it's not as natural as A specializes B that specializes C.
by kimi 3y ago
They are, but it's not as natural as A specializes B that specializes C.
- toast0 3y agoIt's maybe not quite as formalized inheritance, but (at least in Erlang) you can make behavior B that is a behavior A, and in module C (which implements behavior B), do B:start(C, ...) B;start/? Most likely does A:start(B, ...) and when the callbacks come in, B may call functions from C or not depending on things (such as if there is an optional callback defined). If your boilerplate turns out to not really be that samey though, it's easier IMHO to have a template and customize it where applied.