I think this is a bad idea. One of the things that really appeals to me about algorithms presented through functions is that I can predict the behaviour of them. It will do something generically on a category of types. I think any need to change the behaviour of an algorithm either means that the algorithm was written incorrectly, or really you just have a different algorithm and you should probably use another name for it. One of the things I've really lost faith in over the years is method overrides, becuase of how confusing it has made code I have had to read. These days I prefer generic functions that give me one or maybe a couple of places to look when something goes wrong.
I'm going to get into an opinion on member functions and
overrides here, and it's kind of "anti-classes," so you can
choose to ignore this post if you don't want to hear about that.
- "hijackable"/"custom... monarch_dodra via Digitalmars-d
- Re: "hijackable"/&qu... w0rp via Digitalmars-d
- Re: "hijackable"/&qu... Meta via Digitalmars-d
- Re: "hijackable"... Idan Arye via Digitalmars-d
- Re: "hijackable&q... Meta via Digitalmars-d
- Re: "hijackab... monarch_dodra via Digitalmars-d
- Re: "hij... Steven Schveighoffer via Digitalmars-d
- Re: "... monarch_dodra via Digitalmars-d
- Re: "hijackab... Idan Arye via Digitalmars-d
