News for hackers. Stuff that matters.
Re:Less is exponentially more (2012) by pmelendez on Friday September 20, 2013 @10:12AM (#6417788)
> "In the end, when I code in C++, it's because I believe my code will run faster"

Completely agreed and exactly my point. I am not moving to Go because is solving problems that I don't have.

Pike said: "That way of thinking just isn't the way Go operates. Zero cost isn't a goal, at least not zero CPU cost."

So Go's philosophy is to make some compromises for the sake of making programmer's life easier. C++ is the other way around, there is a cost the programmer has to pay in other to have code abstractions without impact the performance.

I don't think anyone "loves" to code in C++, but people tend to like the performance that C++ provides and are eager to pay the cost of programming in a monster language that no simple person fully understand.

Re:Less is exponentially more (2012) by hackinthebochs on Friday September 20, 2013 @10:51AM (#6418044)
I love coding in C++. The feeling of being so close to the metal that your actions are directly controlling the machine is something that was lost immediately when I moved to Java. It even more of a disconnect in higher level languages.
Re:Less is exponentially more (2012) by twoodfin on Friday September 20, 2013 @11:19AM (#6418245)
I have sort of the opposite feeling: I love that in C++ I can create very nice abstractions while being fairly confident that the compiler will transform them into code with C-like performance. That is, as long as you know what to avoid (namely: heap allocations and unnecessary copying).
Re:Less is exponentially more (2012) by Pxtl on Friday September 20, 2013 @12:14PM (#6418633)
This is the thing. This is what gets lost. C++ was designed with the premise that the language allows you to use it both in a C-like context and a Java-like context.

The problem is that some of the baggage of the former interferes with the latter. C++ is danged ugly in some places in ways that could be expressed cleanly in higher-level languages.

That's what C++ coders want - C++ with modules and real generics and fast compile-times and ways to cleanly implement and use garbage-collection if you so choose. A language that lets you say incredibly complicated and detailed things, and then lets you abstract them away into a library or a class or some other unit of organization that lets another coder use your stuff without absorbing the complexity.

All these "C++ replacements" assume that the solution is to gut out all the C-like stuff. What they should be looking to do is giving developers clean alternatives to the C-like stuff, including ways for the hardcore developers to provide their own clean alternatives to the C-like stuff. Don't give us garbage collection, give us the tools to write libraries that provide clean garbage collection to a developer.

Re:Less is exponentially more (2012) by pmelendez on Friday September 20, 2013 @02:30PM (#6419594)
>"This is what gets lost. C++ was designed with the premise that the language allows you to use it both in a C-like context and a Java-like context."

I got lost with the "Java-like context" thing. If I am not mistaken, by the time that C++ was designed there no language with a GB other than Lisp dialects. Jav a would appear like 12 years after, so I am not sure what you mean with Java-lik e context.

As for the design goals of C++, I think was actually to create a superset of C t hat allow to give abstraction facilities that C doesn't have (starting with OOP but right now way more than that)

Re:Less is exponentially more (2012) by pjmlp on Saturday September 21, 2013 @03:48AM (#6422289)
If by GB you mean garbage collection.

Lisp, Smalltalk, Ada, Simula, ML, ...

Simula was the inspiration for C++ by the way.

Re:Less is exponentially more (2012) by bjz_ on Friday September 20, 2013 @11:45AM (#6418427)
Exactly. That is what is lost in most of these debates. In order to move forward in the design of systems programming languages, we must first recognize what makes C++ great, in spite of its deep flaws.
Re:Less is exponentially more (2012) by efdee on Friday September 20, 2013 @11:25AM (#6418294)
Replace C++ with assemblee and Java with C/C++ and the statement is still true. Funny how that works...
Re:Less is exponentially more (2012) by seertaak on Friday September 20, 2013 @01:14PM (#6419059)
True, but append "while retaining access to my favourite high-level abstractions like classes, generic containers and algorithms" and now it is no longer true.

That's the difference: in C++ you get the abstractions -- just like in Java -- but you don't pay for them.

For the record: I used Java extensively in my previous job. It's a language I love, and I do think there are many areas where its speed is sufficient. But I'm also quite fond of C++, and there is this nice feeling of "woah, it doesn't really get faster than this, and it's still readable and elegant!" :)

Re:Less is exponentially more (2012) by pmelendez on Friday September 20, 2013 @02:35PM (#6419631)
>"That's the difference: in C++ you get the abstractions -- just like in Java -- but you don't pay for them"

That's not enterally true, you do pay for them, not in performance but in productivity. C++ is a complex language and even Alexandrescu touched this subject in Going Native 2013, he said something like "C++ is a language for experts"

Re:Less is exponentially more (2012) by pjmlp on Saturday September 21, 2013 @03:50AM (#6422296)
And Java is a language for offshoring projects with lower skill developers.

Not bashing the language, just stating the sad state of affairs.

Re:Less is exponentially more (2012) by jawr on Friday September 20, 2013 @10:40AM (#6417974)
I used to really enjoy writing C++, but that feeling can be compared to doing a really big workout. It's a gratifying hurt.
Re:Less is exponentially more (2012) by kybernetyk on Friday September 20, 2013 @11:34AM (#6418365)
> I don't think anyone "loves" to code in C++

I do. :)