On Sun, 06 Mar 2016 20:33:39 +0000, sigod wrote: > Video: https://www.youtube.com/watch?v=QM1iUe6IofM Article: > https://medium.com/@brianwill/object-oriented-programming-a-personal- disaster-1b044c2383ab > > Interesting talk. Especially given that my D code tends to be structured > very similarly to what Will suggests.
The article didn't make it to suggestions (besides "no OOP ever"), and the video was too boring for me to pay any attention. The one example he did give was pretty unconvincing. "Should a Message send() itself?" Messages can be sent to any of a variety of places, so you need to send an endpoint along. An endpoint comprises some amount of data to specify where it's going, and it might be a pointer to memory shared between processes, or a URL for a REST interface, or a socket file descriptor, or... You could pass just that data along, probably as a discriminated union, and have a send() function that specializes based on which value is passed. But it's simpler and more extensible to use an interface and implementations.
