3 ms·
> I want to discuss why someone like linus hates C++. Personally reading some of Linus's complaints about C++ seem a little misplaced. And yet, I don't disagr
by wvenable 5y ago
> I want to discuss why someone like linus hates C++.
Personally reading some of Linus's complaints about C++ seem a little misplaced. And yet, I don't disagree with him either. He says C++ is a terrible language and it's really hard to disagree with that -- not because it's object-oriented but because it's C++.
When I was taught C, we were taught to carefully separate things to avoid trouble. If you're building a linked-list library, you don't export the struct definition you use abstract data type. You prefix your function names to make a namespace. The Linux kernel uses vtables in C to implement polymorphism for various drivers (e.g. different file systems with the same interface). OOP makes these things explicit.