Live data from Hacker News

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

news.ycombinator.com

121–130 of 199 posts

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

#121

All our infrastructure technology, services, and almost all “applications” we have built are written in C++. That’s millions of lines of code and span everything from IR, distributed storage and computation, ads serving, relational and columnar datastores, caching and much more. It’s about velocity and experience. Language rarely matters ( and when it does, you can use what’s appropriate ). For us, C++ checks all the…

I agree. It's also an ISO standard that IMPO, will be in use for the next 50 to 100 years. Modern C++ is very safe and very fast and very mature.

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

#123
I almost exclusively use C++ for my projects. Especially modern C++. When it makes sense(especially for dev tools), I use Python since for those I'm not so worried about distribution and long-term robustness.

Anyway here they are:

Qt desktop app written in C++:https://github.com/thebigG/Tasker

Simple GPIO front-end for linux GPIO driver(could definitely use some improvement) written in C++ and uses boost:https://github.com/thebigG/simple_gpio

WebApp I JUST started working on(This will be a frontend for a YOCTO/FPGA project I'm working on; guitar pedals), and yes it uses good old C++ and runs on the browser:

https://github.com/thebigG/wPedals

And while I'm at it, might as well mention my custom plugins for Godot Game Engine(C++):https://github.com/thebigG/godot-3.x-modules

I have found that C++ is the best compromise for me between performance and elegance ifI do say so myself.

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

#124

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…

Real question: You specifically wrote >. To be clear, I am not an embedded systems programmer (nor an HN troll!): Does C also qualify? I heard that sometimes embedded engineers are forced to choose C where the C++ compiler is poor or does not exist. Can you please also share your platform(s) and compiler(s)? I am curious to learn more from an industry insider!

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

#125
post #26

I've started using C++ for the REST backend for a mobile app recently. I'm using restinio for the REST layer (sadly deprecated a couple of months ago, but it still seemed like the best option in terms of clean interface) and sqlite for the DB layer. I've architected it all so I have a purely insert-only and order-independent DB on the write-side, so litestream was seeming like a good fit for single-writer, multiple r…

What kind of performance do you need that Dart wasn't sufficient?

Performance wasn't the only reason for switching, but doing sqlite through dart is quite slow even using the batch API due to the copying to the isolate, and in any case I'd be limited to a single thread using dart which I expect would limit me later on.

At that time, I hadn't invested much time into the dart version, but it was looking unlikely that I'd be able to scale it as well as I wanted on the server-side, and the little I gained in development time from shared code by using dart didn't feel significant enough to warrant the performance hit.

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

#126
post #91

Earlier quoted context omitted.

> I'm using it to make Rust programmers seethe. Oh, don't worry, we really couldn't care less if you're using C++. :-)

You'll just do a clone in Rust in a year or so, if the C++ version turns out to be useful :-)

Exactly, and the Rust version will "mysteriously" turn out to have fewer security vulnerabilities, scale beyond 1 CPU core, and have a nicer CLI interface :-)

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

#127

All our infrastructure technology, services, and almost all “applications” we have built are written in C++. That’s millions of lines of code and span everything from IR, distributed storage and computation, ads serving, relational and columnar datastores, caching and much more. It’s about velocity and experience. Language rarely matters ( and when it does, you can use what’s appropriate ). For us, C++ checks all the…

Above, you wrote >. Most people would say that C++ has lower velocity than other higher order languages, like C#, Java, Python, Ruby, etc. You also include the term > which is a curious combination. In my professional experience, language "experience" dominates most discussions about what langauge to use for a new project. After all, programmers are humans who have biases from their (programming) langauge experience. (Zero trolling on the last sentence!)

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

#130

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 man…

> There are many many libraries available in rust due to the amazing dependency system. But the average quality is quite poor.

The main problem with Rust is that it is thread safe, and that makes code and libraries very hard to write. Thread safety is a lot stricter than memory safety, and since it is easy to write single threaded memory safe modern C++ it gets hard to shift to Rust.

But if you want thread safety or mostly do data processing scripts then Rust is far superior, just that for many applications enforced thread safety is an anti feature since it makes your code way too hard to work with. If they could make ergonomic thread safe libraries for everything then great, but I really doubt it will ever happen as it is very hard to do.

Post reply on HN