Live data from Hacker News

C++11 FAQ

stroustrup.com

11–20 of 121 posts

Re: C++11 FAQ

#11
post #4

Earlier quoted context omitted.

some of the pain points you refer to, esp move semantics, bring a lot of additional performance to the table. Would you feel the same way about C++ if you started now and only had to learn a clean C++11 subset going forward ?

I've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.

Maybe they don't bother. PSU is still teaching C++98.

Re: C++11 FAQ

#12

Earlier quoted context omitted.

I've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.

Maybe they don't bother. PSU is still teaching C++98.

That was the thing: starting with C++98, I was able to pick up C++11. But starting from scratch? I'm not sure.

Re: C++11 FAQ

#13
post #4

Earlier quoted context omitted.

some of the pain points you refer to, esp move semantics, bring a lot of additional performance to the table. Would you feel the same way about C++ if you started now and only had to learn a clean C++11 subset going forward ?

I've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.

The norm in the game industry is usually to expect some kind of background in low-level programming (maybe C, maybe some version of C++), and then teach new employees a very specific, restricted subset of C++ that's the in-house dialect (and every company has its own, different subset).

Re: C++11 FAQ

#14
post #4

Earlier quoted context omitted.

some of the pain points you refer to, esp move semantics, bring a lot of additional performance to the table. Would you feel the same way about C++ if you started now and only had to learn a clean C++11 subset going forward ?

I've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.

that's because it is impossible. it takes years to master the language and that was before i lost touch with it around 2010 back when C++11 was TR1 or whatnot.

i understand that what is usually considered good form is trying to completely forget about C features like pointers and arrays and use their STL counterparts like unique/shared_ptr, std::vector, std::array and iterators. this gets you a nice modern subset of the language that makes it relatively difficult to shoot yourself in the foot.

Re: C++11 FAQ

#15

Earlier quoted context omitted.

> move semantics Move semantics have been great, in my experience (enabling things like unique_ptr). What is causing issues here?

Move semantics are very useful, but there's also something wrong if articles like this are necessary or even possible: https://isocpp.org/blog/2012/11/universal-references-in-c11-...

Oh gosh... how come does anyone not realize what a dead end a language has become once this kind of article needs to be written ?

Re: C++11 FAQ

#16
post #9

I've been programming for money for over 20 years and I grew up professionally writing C and then half-migrating to C++, because the latter very naturally captured lots of C patterns and allowed for more succinct expression of the same. It was lean, expressive and elegant . Just needed a bit of Lisp-y closures and it would've been perfect. And then things got completely out of hand. Elegance was nuked from the high o…

What you paint as a fault might be an asset: C++ is multi-paradigm. There is more than one way to look at something and there is a joyous chaos of varied abstractions from which to choose from. Yes it takes a certain openness of mind and a long learning curve. But then, you get to operate at a level that other platforms can only dream. In full disclosure, I do NOT consider myself a good C++ programmer. But I've alway…

How well has Perl fared? How about Lisp and Scala that are multi-paradigm, how well are they doing?

Re: C++11 FAQ

#17

I've been programming for money for over 20 years and I grew up professionally writing C and then half-migrating to C++, because the latter very naturally captured lots of C patterns and allowed for more succinct expression of the same. It was lean, expressive and elegant . Just needed a bit of Lisp-y closures and it would've been perfect. And then things got completely out of hand. Elegance was nuked from the high o…

That pocket knife is a collector's item. It includes most if not all the individual tools available in different models from Wenger. Victorinox also has one.

The problem is that it's not useful as such and I guess most people wouldn't buy one. I wouldn't mind receiving one as a gift though :)

Regarding C++, if I remember my programming language history right, there aren't many languages that are that old, popular, available in so many domains and still evolving to keep up with the times.

Language design has progressed a lot, the hardware has advanced at an exceptional pace. Today's context is very different.

I say we wait another 20 years to see how Rust & D are doing. Python might be old, but it only really became popular this century, as Perl declined. I estimate that C will continue its slow decline with time.

Re: C++11 FAQ

#18
post #9

I've been programming for money for over 20 years and I grew up professionally writing C and then half-migrating to C++, because the latter very naturally captured lots of C patterns and allowed for more succinct expression of the same. It was lean, expressive and elegant . Just needed a bit of Lisp-y closures and it would've been perfect. And then things got completely out of hand. Elegance was nuked from the high o…

What you paint as a fault might be an asset: C++ is multi-paradigm. There is more than one way to look at something and there is a joyous chaos of varied abstractions from which to choose from. Yes it takes a certain openness of mind and a long learning curve. But then, you get to operate at a level that other platforms can only dream. In full disclosure, I do NOT consider myself a good C++ programmer. But I've alway…

> C++ is multi-paradigm

Yep, here it is - http://i.imgur.com/1oGHYqi.jpg :)

Re: C++11 FAQ

#19
post #4

Earlier quoted context omitted.

some of the pain points you refer to, esp move semantics, bring a lot of additional performance to the table. Would you feel the same way about C++ if you started now and only had to learn a clean C++11 subset going forward ?

I've often wondered how anybody manages to teach C++ today. I love working with the language, and I understand the reason behind many of the features, but I can't help but feel like it would be impossible to teach to beginners.

Fwiw, I followed this course at my university[1]. The 'schedule' and 'setup' links provide an idea of what is treated, and the full book is available[2]. The full course took slightly over six months, so yes, it takes a while :)

1. http://www.icce.rug.nl/edu/ 2. http://www.icce.rug.nl/documents/cplusplus/

Re: C++11 FAQ

#20

I've been programming for money for over 20 years and I grew up professionally writing C and then half-migrating to C++, because the latter very naturally captured lots of C patterns and allowed for more succinct expression of the same. It was lean, expressive and elegant . Just needed a bit of Lisp-y closures and it would've been perfect. And then things got completely out of hand. Elegance was nuked from the high o…

What's wrong with C++'s closures?
Post reply on HN