5 ms·
It's not obvious - because I bet most of HN is wondering right now. It's not necessarily all wrong to be coding microservices in C - it has been done, and has b
by sgt 9y ago
It's not obvious - because I bet most of HN is wondering right now. It's not necessarily all wrong to be coding microservices in C - it has been done, and has been done in C++ as well. I like the pledge approach.
I would like to see nginx support here instead of just OpenBSD's web server. Perhaps this is because nginx won't work with pledge?
- pjmlp 9y agoThe difference being that C++ offers the language features and standard libraries to write safer code, while C....
- PrimHelios 9y ago>C++ >Safer code Not really. I mean, using vectors and strings is nice, but that's about it for safety. You'll still get a shit-ton of memory leaks which isn't great for long-running web apps.
- pjmlp 9y agoIt seems you haven't updated yourself on C++11, C++14, C++17 best practices. If the code has any explicit new/delete or malloc/free, then something is wrong with the design.
- nickpsecurity 9y agoFor a specific example, iMatix had DSL's that outputted C which they used for high-performance server apps. If doing that for web apps, one would need a web framework for C that the code could call. I believe I've also seen both a C and C++ framework in the past. Both bragged about efficiency with the servers cheap.