3 ms·
Is there a "c++: The good parts" ? One of the projects I'm working on could have just as easily been written in c++ instead of go.. except that in go starting
by justinsaccount 10y ago
Is there a "c++: The good parts" ?
One of the projects I'm working on could have just as easily been written in c++ instead of go.. except that in go starting the project and building it involved
mkdir my_project
# hack
go build
I wouldn't even know where to start to write a simple c++ server that uses zmq and slings json around. How am I supposed to handle dependencies and vendoring?
As much of a PITA it is trying to learn rust, getting the toolchain working and starting a new project was not one of the issues I ran into.
- sien 10y agoHave you read Effective C++ & More Effective C++? That's a start for what you want.
- lj3 10y agoI think you mean "Effective Modern C++". The two you mention predate C++11. https://www.amazon.com/Effective-Modern-Specific-Ways-Improve/dp/1491903996/ref=pd_bxgy_14_3?_encoding=UTF8&psc=1&refRID=CJT3K27NC7A692DCXP46 https://www.amazon.com/Effective-Modern-Specific-Ways-Improv...
- jawilson2 10y ago20 seconds of googling turned up several answers which only require about 30 lines of C++, e.g. http://stackoverflow.com/questions/37765847/send-json-object-through-zmq-with-c-client-python-server http://stackoverflow.com/questions/37765847/send-json-object.... cmake is pretty awesome at handling dependencies; our build process grabs dependencies from git and adds them to the project. Yes, there is more overhead and a learning curve, and if you are running a simple server there are probably better choices; we use a ton of python for these things, and wrap performant code in cython.
- justinsaccount 10y ago> 20 seconds of googling turned up several answers which only require about 30 lines of C++, OK... Now how do you turn those 30 lines of code into an actual project that you can build and cross compile? Write 100 lines of cmake stuff to build 30 lines of code? I think if I was starting from scratch I'd try to use something like bazel.