News for hackers. Stuff that matters.
Re:C++ confessions of a C developer by kartan on Saturday December 03, 2016 @06:01PM (#13097913)
> and calling it C++

We used to call it C+. It was code that could not be compiled by a C compiler. But at the same time was painfully obvious that it was not proper C++.

Re:C++ confessions of a C developer by pzh on Saturday December 03, 2016 @07:26PM (#13098179)
I think there is this misconception that there is a 'proper C++'. C++ was designed to support various programming styles, including this 'transitional' style where you have a C codebase that you slowly convert to a more object-oriented style, but overall it still remains an ugly mix of the two.

What makes C++ proper is pretty much what code style and best practices your organization/project decides to adopt. For some projects, 'proper' may be object-oriented C++ with class hierarchies, whereas for others it may be a more functional or template-based style that doesn't even use classes a lot.

Re:C++ confessions of a C developer by astrodust on Saturday December 03, 2016 @09:35PM (#13098526)
As C++ features started to creep back into C you'd see a lot more of this. The // comment identifier is perhaps the most famous of these.
Re:C++ confessions of a C developer by pjmlp on Sunday December 04, 2016 @02:09AM (#13099111)
const came first.
Re:C++ confessions of a C developer by astrodust on Sunday December 04, 2016 @04:42PM (#13101922)
Nobody in the C world really cares about const, it's extremely rare to see it in the wild. The // comments, though, are ubiquitous.
Re:C++ confessions of a C developer by pjmlp on Sunday December 04, 2016 @06:18PM (#13102309)
Yet another proof why C software is so safe, when comments are more important than correctness.
Re:C++ confessions of a C developer by astrodust on Monday December 05, 2016 @01:18PM (#13107744)
The const keyword has nothing to do with correctness and everything to do with helping the compiler understand which values are immutable and can be optimized.