Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@icscarythings @GoodPerson @Hoss @bot @iancho @kroner @neko ive been writing in both for a good while and I can tell you the effect you're seeing is an observation of imperative vs functional style. Lower level or helper functions should normally be written in a "stateless" manner as much as possible. That is, mostly static functions that take inputs an outputs, not implicitly changing globals or variables. Higher level logic is what should be explicitly keeping track of program state (which is what C++ is better at managing). You can still write the library parts in C++ but its best to avoid "business logic" state unless you're writing a framework with dependency injection.
For what its worth, I have written production servers in C++, but I wouldn't do it again. They're just too sensitive to crashes.