Coffeehouse Post

Single Post Permalink

View Thread: A quick self-reminder why I did not pursue native development
  • User profile image

    Where does the safe C++ end and the C or unsafe concepts begin (as both can be in .cpp) - How can I tell which header has only C++ things in it (ignoring OS calls)? Are there things I can't do without use of C, eg. lack of libraries written this "safe/pure C++" that accomplish everything I could possibly want (in user land)?

    Is there a C++ book/resource/authority that claims that by following their teaching you won't be making C-style mistakes or even that you get managed-level safety with C++ performance? 

    1) "Safe C++" is C++ without ever using a pointer or the "new" keyword. It's possible, but it's hard (and it's not necessarily safe)

    2) C++ headers don't have a ".h" in the name. In C you #include <string.h> and in C++ you #include <string>.

    3) You can do anything in C++ that you can do in C because C++ is (almost) a superset of C.

    4) There are no C++ books/resources or authorities which guarantee that the code you write will be free of bugs, but then there aren't any for ASP, PHP, C# or Java either (and there are more published exploitable bugs in PHP and ASP than C/C++ even though protecting C/C++ is actually much harder).