3 ms·
I'm the opposite. When I code in C++ I have to spend far too much time thinking about the language rather than the problem at hand.
by tonyedgecombe 6y ago
I'm the opposite. When I code in C++ I have to spend far too much time thinking about the language rather than the problem at hand.
- IshKebab 6y agoIn C++ you spend time wondering "who owns this allocation?". In Java you spend time wondering "what exactly is ConfigurationGeneratorFactoryInterface?". Clearly the solution is Rust. :-P
- moldavi 6y agoKnowing who owns an object is a solved problem in C++, most codebases I've seen use unique_ptr. Rust isn't the only language with ownership.
- IshKebab 6y ago> a solved problem Quite an exaggeration. I've never seen a C++ codebase that doesn't resort to bare references or pointers at some point. None of them exclusively use unique_ptr and shared_ptr.
- moldavi 6y agoRaw pointers and raw references are non-owning, shared_ptr and unique_ptr are owning. Ownership is solved in modern C++.
- tonyedgecombe 6y agoConfigurationGeneratorFactoryInterface Writing stuff like that isn't mandatory.
- IshKebab 6y agoNo, but most of the Java ecosystem is written like that. Are you going to write your own logging system, HTTP server, GUI framework, etc? Of course not. So you're stuck with `ConfigurationGeneratorFactoryInterface`.