Live data from Hacker News

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

news.ycombinator.com

51–60 of 199 posts

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

#51

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…

Don't know your use case, but C++ for a REST api seems extreme overkill. Any performance benefits would most likely be nullified by network latency

Sure, but my dart implementation was much slower to start than I'd like for iterative development and also was consuming a chunk of memory.

My current version (admittedly still very early in development) starts in under a second and occupies 300MB after doing some unrepresentatively large transfers (200k records when the application will be doing more like 200 at once). The downside is that compile times are a bit higher.

I could have used something else, but like I said, I'm very familiar with C++ as it's what I've used day-in, day-out for the the last 15 years.

restinio is a pretty good library - the code I'm writing in C++ isn't much more verbose than the flutter code, in fact in some places it's got less boilerplate as it's heavily templated, so e.g. json_dto just requires a single definition to support JSON serialisation and deserialisation.

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

#52

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.

Abseil Tips of the Week have some gems. https://abseil.io/tips/

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

#53

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.

effective c++ is a bit out of date but still very good. i read it while learning c++ 'properly' last year and found it very helpful, but it helps to have some knowledge of modern c++ to know what is still relevant. there isn't much overlap with effective modern c++.

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

#55

I use C++ for audio processing software, although I prefer doing it in normal C because C++ is too messy and abstracted. That being said, C is a bit too messy and abstracted too, with too much "taken care of" by the compiler.

Do you mean that you would like to set up vectorized operations manually? Or something else?

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

#56
post #4

Starting a new side project, no platform-specific functionality needed. Tried out a few relatively "new" languages (more like new to me) and experienced severe frustration from bugs and spotty documentation, lack of proper IDE/debugger support. So, I figured, better the devil you know. And of course: choice of compilers, choice of FOSS libraries, my own libraries and workarounds to various well-known annoyances and,…

Which languages did you try out?

Swift/XCode (guess I had unrealistically high expectations, the whole experience was just downright infuriating), Seed 7 (somewhat exotic, I liked it but had some build problems on Mac), Groovy, FreePascal/Lazarus, D+VScode (almost), Python+VSCode. Embarrassing perhaps, but I ended up doing my prototype in PHP, debugging on my Mac was not fun but its awesome documentation kept on saving the day.

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

#57

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…

Don't know your use case, but C++ for a REST api seems extreme overkill. Any performance benefits would most likely be nullified by network latency

Have a look at https://okws.org

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

#58
post #28
post #4

Starting a new side project, no platform-specific functionality needed. Tried out a few relatively "new" languages (more like new to me) and experienced severe frustration from bugs and spotty documentation, lack of proper IDE/debugger support. So, I figured, better the devil you know. And of course: choice of compilers, choice of FOSS libraries, my own libraries and workarounds to various well-known annoyances and,…

Have you tried GO with GoLand IDE?

I haven't, it was on my list but I eventually ran out of time an patience. Definitely planning to try it out at some point as I keep on reading great things about it.
Post reply on HN