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

Do you mind asking 'Why C++'?

I know that doesn't answer your question and to be honest, I am curious about the resources which come up here too, but C++ can be so painful to learn that I wanted to know what drives you into that direction. I mean, there are alternatives like Rust. Do you have a specific project in mind, need it to fulfill some résumé requirements or something completely different?



Depending on the direction you want to go in your career, it's still a major need.

Any complex or high-performance computing relies on C/C++ pretty heavily still.

It's also a good tool to have in your box for building well-performing cross-platform native apps with Qt.

I say this as one who's probably at the same stage as OP. Know some C, and reasonably comfortable with the basics. Application of C++ is a little more widespread outside of strict embedded environments, however. (Another space I personally want to immerse myself in)


Qt is about the last library I'd call modern in terms of C++ dialect it employs or requires...

(There are worse but deprecated like MFC. Or on par like wxWidgets.)


I suspect your intel on Qt's C++ use is a bit out of date. Qt nowadays uses (and requires) C++11, as well as more modern constructs.


Qt may be inspired by modern C++, but you don't get hands on experience using the STL since Qt re-implements almost the entire thing.


Not OP, but good question.

I find Rust is a much better language, but there are very few mature libraries right now if you do something outside the scope of what Mozilla is doing. Also very few companies that are working in Rust (AFAIK, if you know some let me know) looking for devs.

If you want to work in a company that is doing any kind of low level code you will either need C or C++ as a foundation. At least to understand existing code. Most companies won't just rewrite everything in Rust, no matter how good the language is.

I really hope Rust replaces C++ for new projects, but it's just too new to tell whether that will happen. I find there's a bit more momentum (and good ideas) than in D, but nobody can predict the future from 2-3 years of language history.


> if you know some let me know

“This Week in Rust” lists explicit job postings. One of the latest companies looking for Rust programmers is a little company you may have heard of: Facebook.

That said, many places are hiring good programmers and putting them on Rust projects, rather than hiring Rust programmers explicitly. There aren’t many pure Rust shops yet, so they need a broader skill set.


I'm pretty good in C as well (less C++). I just would like to know beforehand if I could grow into a Rust role there.


Yeah, that's the issue with these kinds of roles. You'd have to ask each company, of course.


Indeed.

I still haven't grasped Rust as much as I'd like, but I have to admit that at least it feels like every part of the language fits nicely together with the others, as opposed to the "messy spaghetti" feel I get from C++ (though this is of course my subjective impression).

There are things I'd like they do, like removing the Python 2 dependency for building from source, or actually writing a spec. But I guess that'll come with time.


I never built from source, so Python 2 dependency for that didn't bother me. I kind of like the documentation as spec as long as the language is still evolving so quickly. Maintaining separate documents would be more difficult here.


I find this comment a bit odd... Not everyone works at a startup and 90% of development work is improving existing codebases, not starting new projects. There's just SO MANY existing C++ codebases out there that people are paid to work on. I had to (re)learn C++ for a project at work recently.


First off, my apologies for the late response.

I'd like to learn OpenGL programming, and C seems too painfully low level for that, although I won't argue that it is a lot easier to wrap your head around it. However, this days I've been toying with C++14, and the experience (apart from the dependencies, Makefiles, et al. mess, has been pretty smooth with regards to syntax.

Apart from OpenGL (which seems like a neat way to learn some interesting maths and physics), learning C++ helps delve into many big and important existing codebases, especially databases, and other complex systems. Rust may be designed for that but it isn't used so much in the wild.

Moreover, I want to feel badass in a hardcore low-level hacker way after programming so much in high-level dynamically-typed languages, and contribute my one stone to the future grave of JS/Node (let's hope Atwood's law won't work :P).


Why C++ over Rust? Rust is still in very early stages. The compiler, tools, ide and library support is world's away from where rust is at the moment. Language design is one part of many that helps with software creation.


Because you might have to choose between C++ and Go




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

Search: