3 ms·
Ask random C++ developers what their favorite feature of C++ is and you will get a very wide spectrum of answers. That's what is always said, but is it actuall
by danieldk 12y ago
Ask random C++ developers what their favorite feature of C++ is and you will get a very wide spectrum of answers.
That's what is always said, but is it actually true? I think a couple of answers will be prevalent and at the top of the list:
- Deterministic destruction
- Manual memory management / no GC
- Templates
- C interoperability
Would be fun to actually do such a survey and see if there is more spread than other languages.
- MereInterest 12y agoI'd also add operator overloading, though that tends to go hand in hand with templates. The fact that I can write numerical code that works for say, any type that implements addition and scalar multiplication, is wonderful. In Java, as far as I know, this would be utterly impossible, because implementation of interfaces must be explicitly mentioned. Even though Double implements addition and scalar multiplication, it could not be used in such a function because it doesn't explicitly state that it implements such an interface.