4 ms·
In my experience, people who like to use the preprocessor come up with very non-OO abstractions. Similarly people who program heavily using templates in C++ te
by btilly 13y ago
In my experience, people who like to use the preprocessor come up with very non-OO abstractions. Similarly people who program heavily using templates in C++ tend not to use a lot of the OO features there either.
I may be more aware of this than you because my design sensibilities by nature are not particularly OO. This is not to say that I can't produce and understand OO designs. I both can and do, particularly if I have to cooperate with people who expect that. But given the choice, I'm more likely to head in a different direction. (A dictionary full of closures can be surprisingly useful...)
- asveikau 13y agoI guess I don't see a strong distinction (or see them on the same axis) because I like the preprocessor and use it when I feel it's useful, but I still write fairly OOP-like public interfaces to my code.
- btilly 13y agoI guess I'm not sure what you mean by "fairly OOP-like public interfaces". My strong suspicion is that you're referring to features that were standard in imperative programs prior to OOP becoming popular. For instance structs in C are functionally equivalent to records in Pascal which date back at least to ALGOL W in 1966. By contrast the earliest OO language is Simula 67 which came out a year later. If so, then I disagree with you about what "OOP-like" means. I first learned about the value of information hiding, etc, from Code Complete. The first edition of which was published before OO programming had become mainstream, and therefore says not a word about OO. That said, the ideas in that book translate well into an OO world. (And the second edition does talk about OO concepts.)
- asveikau 13y agoIf the same ideas of OOP have been around longer than the term itself (and I do believe you are right in pointing this out), do they cease to be the same ideas? This to me is degrading into a "tomato, tomato" discussion. Reminds me of arguments I used to get into with a friend. My friend was really into naming patterns and stuff. I really disliked that, and thought to give it a technobabble-ish name distances the practice from the concept itself, which is usually more straightforward than the name suggests. I don't think your comment is the first thing I've read that steers me in the direction of "OOP as a buzzwordy name for preexisting, good, clean practices".