Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do Java, .NET and C++ consultancy and I bet an Java expert would fail most Java Puzzle questions.

Also a programming language is not used alone and C++ standard library is quite tiny when compared to Java's standard library.



That's true, but there's virtually no aspect of the C++ language or library that doesn't have a wealth of "gotcha" questions one could ask.

Even parts of C++ that are "normal user" features can be remarkably tricky. I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument.

There's a reason why a very common recommendation is to pick a subset of C++ and stick to it, and I've never heard of such a recommendation for any other language (outside of perhaps for portability reasons).


> I know tons of C++ programmers who I'd happily trust to write code for me who would fall flat on their faces if asked to explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument.

That is true.

I can also remember other ones like differences between auto and decltype, or between auto and template parameter deduction across language revisions.

However, Java puzzles like the ones presented at Java ONE, or .NET changes in how native error handling changed on .NET 4.0, among many other examples, are also interesting as quiz questions.


> explain some detail of what std::forward does with an rvalue reference parameter bound to an lvalue argument

std::move?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: