Live data from Hacker News

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

news.ycombinator.com

41–50 of 199 posts

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

#41
Started a new job which requires me to know c++ so I’m learning that. Half c# and half c++.

Bought some books.

- Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14

- C++ Concurrency in Action

- C++ High Performance: Master the art of optimizing the functioning of your C++ code

If anyone has any recommendations would love to hear them.

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

#42
post #24

Me. On every project that I need to compile for AIX. Not my favorite language by far, but it's pretty nearly the best choice on the platform, if you want cross platform code and don't want to fall into Java.

Nim, Haskell, OCaml (bytecode only I believe, unfortunately), D perhaps, and Go (AIX 7.2+) are not bad options, depending on your needs and taste.

I'm hoping mrustc or the gcc frontend become viable too.

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

#43
If started last year counts as new then I am using it for work aiming at low latency processing of data so seems a good fit, but to be honest it's my default language choice as well. The tech stack also has a number of typescript services and python for tooling, there is a service in golang too but it's a minor part.

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

#44
In terms of LoC, I'm probably at 25% C++, 65% Dart (Flutter) and 10% Kotlin/Swift. Probably not enough to qualify as "main language", but enough that I'm writing it multiple times a week.

C++ for the low-level machine learning (Kaldi/ONNX) & rendering (Filament) components, Dart for the service/model/view layers and Kotlin/Swift for hooking things up to native APIs.

I can't claim to be a C++ expert but I've found that working with RAII, staying away from templates and being slow to incorporate newer (>C++11) features keeps things reasonably sane. The standard library is definitely painful to use in places (streams, chrono, etc) but all things considered, I still prefer it to Rust.

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

#46

We are using c++ mainly because Qt/QML exists. I guess if a Rust gui toolkit exists that is comparable to Qt/QML (looking at you https://slint-ui.com/ ), then future project would have to be re-evaluated.

My plan is to use Tauri in Rust likely with just the view in TypeScript (will probably move state into Rust). No, it isn't Qt/QML and HTML/JS/CSS aren't as snappy or memory efficient, but with work they can be made reasonable and bonus is styling is endless.

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

#48

Almost every game ever. A good deal of stuff where I need complicated algorithms and want performance but don’t care too much about integrating with web stacks (which is always a chore in C++).

>don’t care too much about integrating with web stacks (which is always a chore in C++)

Why so? Using Emscripten You can always compile C++/C to WebAssembly (for execution in web browsers).

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

#49
post #24

Me. On every project that I need to compile for AIX. Not my favorite language by far, but it's pretty nearly the best choice on the platform, if you want cross platform code and don't want to fall into Java.

AIX... you're bringing back bad memories of running xlc on a AIX 4.3.3 system, back in the early 2000's.

Somehow I had more fun coding on Aix than HP-UX, even though I used HP-UX longer.

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

#50

In terms of LoC, I'm probably at 25% C++, 65% Dart (Flutter) and 10% Kotlin/Swift. Probably not enough to qualify as "main language", but enough that I'm writing it multiple times a week. C++ for the low-level machine learning (Kaldi/ONNX) & rendering (Filament) components, Dart for the service/model/view layers and Kotlin/Swift for hooking things up to native APIs. I can't claim to be a C++ expert but I've found tha…

> The standard library is definitely painful to use in places (streams, chrono, etc) but all things considered, I still prefer it to Rust.

Is that because you’re already into C++, or because Rust is hard to learn, or because Rust’s standard library is somehow painful, too?

Post reply on HN