3 ms·
At work we subcontracted a library. It's written in fairly idiomatic C. The person I replaced wasn't comfortable with C so he asked the sub to write a C++ wrapp
by nwallin 7y ago
At work we subcontracted a library. It's written in fairly idiomatic C. The person I replaced wasn't comfortable with C so he asked the sub to write a C++ wrapper.
Lots of stuff is just a typedef if the C struct in a namespace. Classes that do work all have private constructors and static member functions that return a new'd pointer to the object. They also have static member functions to deallocate the objects.
Thanks for the C++ wrapper assholes. Your C++ wrapper looks more like C than the C library it's wrapping.
Greenfield C++ (or anything that was greenfield with C++11 in mind) is a joy to write. Idiomatic C in C++ or idiomatic Java in C++ is terrible. The fact that you can write so many different styles is probably the reason the language is so ubiquitous, but it sure sucks a lot more to deal with other people's shitty code in C++ than in many other languages.
- asveikau 7y agoIt seems like C programmers uncomfortable with C++ made a wrapper for C++ programmers uncomfortable with C. I don't know why you call them assholes, they are just being themselves, limitations and all, and providing a fairly amusing story for you to tell.