Live data from Hacker News

Ask HN: Who is using C++ as the main language for new project?

news.ycombinator.com

101–110 of 199 posts

Re: Ask HN: Who is using C++ as the main language for new project?

#101
post #47

I'm using C++ for everything because this is all I know.

If C++ is all you know you really should diversify a bit, learn something very different, like a lisp or Haskell. You probably won't come away doing everything in that new language, but it will certainly expand your way of looking at things.

Re: Ask HN: Who is using C++ as the main language for new project?

#102
I recently decided to leave go and back to c++ for a microservice project, with the new coroutine and async in modern c++, I failed to see anything Go can that c++ can not do, plus the latter has no GC and is just more performant. I will stick to c++ for other future projects.

tried Rust for a few times, finally gave up due to the learning curve and still young ecosystem, it's hard to learn multiple languages and become good with them, I will pinpoint on c++ for other new projects as it seems can do all I wanted.

Re: Ask HN: Who is using C++ as the main language for new project?

#103

C++ is still often the best or only way to write performant code on embedded platforms, while having a rich library ecosystem available. Hence, my first choice for a new embedded project is almost always C++. I would love to be able to use something like Rust, but the RTOS options and library support are not quite there yet. With more powerful embedded processors becoming available, Micropython is an option for some…

I think the RTOS side is being addressed pretty well for rust, which libraries do you feel are missing now?

Re: Ask HN: Who is using C++ as the main language for new project?

#104
I'm doing a (free) backup system (just a hobby, won't be big and professional like dropbox) for PC, Mac and Linux. This has been brewing since april, and is starting to get ready.

To me the choice was between C# or C++, but I ultimately chose C++, because while C# is much faster to code in, when there is a problem, coding directly against the OS, I have much more control in what actually happens and in what dependencies I really have.

Edit:

I also must confess that I'm enamored with the idea of having a comparatively tiny executable without any other runtime dependencies than itself and the OS.

For build system I use meson, and cross compile the Windows targets. It works from Windows XP through Windows 10. (If you have any 32-bit version of Windows, you get the "32 bit XP" version. If you have 64 bit but it's older than Vista, you also get the "32 bit version".)

Re: Ask HN: Who is using C++ as the main language for new project?

#106
post #103

C++ is still often the best or only way to write performant code on embedded platforms, while having a rich library ecosystem available. Hence, my first choice for a new embedded project is almost always C++. I would love to be able to use something like Rust, but the RTOS options and library support are not quite there yet. With more powerful embedded processors becoming available, Micropython is an option for some…

I think the RTOS side is being addressed pretty well for rust, which libraries do you feel are missing now?

No post body was provided.

Re: Ask HN: Who is using C++ as the main language for new project?

#107
All of the recent high-scale data infrastructure projects I've been involved in are written in C++17 or C++20. Mostly fast-twitch analytical database engines and related data processing systems. This is still the go-to language for that kind of systems software, no other programming language is as feature-rich and expressive for that purpose.

The other language that gets used a lot is Python for tooling and similar.

Re: Ask HN: Who is using C++ as the main language for new project?

#108
Context: I write rust professionally I have no plan of coming back to cpp.

Cpp still has the (huge) advantage of maturity. Rust is great but still half-backed. Things like thread-local-storage, custom allocators and async are either unstable or incredibly rough around the edges.

Finally, my experience has been that third-party libraries in cpp are fewer but of greater quality than the ones in rust. There are many many libraries available in rust due to the amazing dependency system. But the average quality is quite poor.

In cpp you tend to be conservative when adding dependencies which means you have a much better understanding of the code you run. Or, you write your own code that’s usually custom made for your purpose, which generally end up as being more performant.

Post reply on HN