HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 262255 thumbnail
User 410289 avatar

By CodeJustin
via gigamonkeys.com
Published: Oct 17 2009 / 07:02

One of the topics I asked most of my Coders at Work interviewees about was C++. I am not an expert, or even a competent C++ programmer and recognize that my own opinions about C++ are not well-informed enough to be worth much.1 But C++ fascinates me—it’s obviously a hugely successful language: most “serious” desktop apps are still written in C++ despite the recent inroads made by Objective C on OS X and perhaps some C# on Windows; the core of Google’s search engine is written in C++; and C++ dominates the games industry. Yet C++ is also frequently reviled both by those who never use and by those who use it all the time. That was certainly reflected in the responses I got from my Coders interviewees when I asked them about it. Jamie Zawinski, as I’ve discussed recently, fought tooth and nail to keep C++ out of the Netscape code base (and eventually lost). Some of that was due to the immaturity of C++ compilers and libraries at the time, circa 1994, but it seems also to have to do with his estimation of the language as a language:
  • 16
  • 1
  • 2031
  • 0

Comments

Add your comment
User 368023 avatar

yakkoh replied ago:

0 votes Vote down Vote up Reply

The usual stuff:

"...C++ forces programmers to subset the language"
"...C++ was pushed well beyond its complexity threshold"
"The syntax is terrible ..."
"I don’t like C++; it doesn’t feel right..."

Like most programmers, I suppose, I use a clean subset of C++, because C++ IS an improvement over C.

User 388907 avatar

MCII replied ago:

0 votes Vote down Vote up Reply

The problem is C++ programmers don't agree about the "clean subset of C++" .

User 466282 avatar

tony.ganchev replied ago:

0 votes Vote down Vote up Reply

What's the definition of "clean subset" ?

User 368023 avatar

yakkoh replied ago:

0 votes Vote down Vote up Reply

It's more or less like a basic C++, with no surprises:

1) no multiple inheritance;

2) no operator overloading except perhaps operator=

3) no exceptions -- use a public function to check if everything is alright;

4) no initialization with the (); write everything with =

5) as little STL as possible, perhaps string;
With string you cannot construct with a predetermined size, even if you know that
the string will never grow. There is constructor but you have to supply a character.

6) no iostream -- I personally find it anti-natural;

7) no templates

8) no struct

9) always construct with new and a pointer like:

BoOkDescription *book = new BoOkDescription(); // this doesn't use the stack.

but

10) namespaces are okay.

It's C with classes.

User 466282 avatar

tony.ganchev replied ago:

0 votes Vote down Vote up Reply

We can debate on the merits of everything up to point 10 but reaching point 1 I don't see if you have any need even for classes since you're not about to do oo or template-based programming therefore you don't need c++

User 199813 avatar

agnus replied ago:

0 votes Vote down Vote up Reply

I find C++ fascinating too. Unlike most developers I know, who proudly vaunt for their C++ experience - most of which probably happened during college - and have long moved to Java/C#, I have been going the opposite direction. Started with scripting languages for a couple of years, then moved to Java for a good 7-8 years period and now slowly started experimenting with C++. Needless to say I am totally loving it.

User 466282 avatar

tony.ganchev replied ago:

0 votes Vote down Vote up Reply

I don't feel forced to use only a subset of c++, nowadays compilers are standard-compliant enough - i support template-based code for gcc, vc++ and intel with no problems. I suppose there still are things I discover about it but this is what keeps it interesting. C++ is the only language today that is a potentially good solution for all software projects. The problem at present is the lack of a good web framework and ORM package but this is not due to a deficiency of the language.

User 338269 avatar

Miloskov replied ago:

0 votes Vote down Vote up Reply

C is simple and straightforward for system programming. C++ It is a mess of a language it wants to be C but in a Frankenstein way. If I need something more high level I could use Java or C# for OOP or Haskell or Lisp for Functional. But really I like C better than C++.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.