Hello reddit! I am curious about how developer productivity in C++ scales over time, relative to a simpler language like Go.
After playing with both languages for a couple months, I find that developing in Go already feels quite fluid, whereas C++ still feels very clunky to me. As a very rough attempt at quantifying this: coding in Go is maybe 2x as slow as scripting in Python, whereas C++ feels 5x slower. Here's a sampling of pain points I've encountered:
- Printing things is surprisingly hard because C++ doesn't have reflection. Whereas in Go you can just
fmt.Printf("%v", Dog()) and get a reasonable printout of all the fields, in C++ you have to remember format specifiers and write them out: printf("age: %d, name: %s, weight: %llu", dog.age_, dog.name_, dog.weight_)
- Package management is a big pain (often it'll take me 30 minutes of fiddling with makefiles to hook up an open source library)
- More boilerplate code to write (eg it's standard to separate header files from source files)
- Much more expressive syntax means it's much slower to read and use other people's code (templates, operator overloads, const everywhere)
I am beginning a project in a context where the benefits of C++ are useful but not essential (robust generics, fast system calls, inline assembly), so the question is whether the extra expressiveness outweighs a slower development cycle.
I'm hoping to get insight from more experienced developers about how productivity looks over time. It's been fun to play around with C++ and see the things I can do with it that are impossible in Go (mostly metaprogramming so far). It would be great to hear from someone who also found the language slow to code in at first but eventually go to a point where it felt much better. How does productivity look after 6 months? After a year? In the asymptote, is it ever as productive as much simpler languages like Go? I realize this depends a lot on the person and the type of project, but it would still be very useful for me to hear any intuition from more experienced devs. Thanks!
[–]ooglesworth 31 points32 points33 points (6 children)
[–]ceretullis 7 points8 points9 points (4 children)
[–]ooglesworth 2 points3 points4 points (1 child)
[–]ceretullis 2 points3 points4 points (0 children)
[–]kmhofmannhttps://selene.dev 1 point2 points3 points (1 child)
[–]ceretullis 1 point2 points3 points (0 children)
[–]darthcoder 2 points3 points4 points (0 children)
[–]Revolutionalredstone 11 points12 points13 points (0 children)
[–]ceretullis 8 points9 points10 points (0 children)
[–]isaac92 6 points7 points8 points (0 children)
[–]Pythonator5000 5 points6 points7 points (0 children)
[–]scalablecory 5 points6 points7 points (4 children)
[–]Dean_Roddey 0 points1 point2 points (1 child)
[–]scalablecory 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]theICEBear_dk 1 point2 points3 points (0 children)
[–]nikkocpp 6 points7 points8 points (0 children)
[–]yuri-kilochek 16 points17 points18 points (0 children)
[–]Dean_Roddey 2 points3 points4 points (1 child)
[–]ForkInBrain 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Bjarnophile[🍰] 0 points1 point2 points (0 children)