On Mon, Mar 06, 2017 at 10:41:06PM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: [...] > Yes, this. Although, granted, the OO-koolaid *was* quite strong indeed > in those days. > > It really is strange to look back on all that, when I was fairly sold > on OO too (just not quite as fanatically so), and compare to now: > > At this point I feel that class-based polymorphism mostly just turned > out to be an awkward work-around for the lack of first-class functions > and closures in mainstream languages. What convinced me: After years > of using D, I find myself using OO less and less (OO polymorphism > nearly never, aside from exception hierarchies), and instead of > feeling hamstringed I feel liberated - and I'm normally a kitchen-sink > kinda guy!
I was never fully "sold" to the OO bandwagon, though I did appreciate the different way of looking at a programming problem. While I found OO to be a nice way of structuring a program that deals with highly-structured data (it was like abstract data types on steroids), I never really understood the folks who see it as the be-all and end-all and want to essentially recast all of computer science in OO terms. Like you, after coming to terms with D's duck-typing range idioms I've started moving away from OO and leaning more in the direction of generic programming via templates. These days I even prefer static polymorphism via structs and alias this, than full-out classes. Of course, classes still do have their place when runtime polymorphism is needed, and I do use that at times. But it occupies a far smaller percentage of my code than the OO advocates would rally for. T -- Do not reason with the unreasonable; you lose by definition.
