3 ms·
If you write more C++ than python, it will have a lower TimeToWriteCode. Despite having spent years writing python I don't find it any more productive than C++.
by inciampati 9y ago
If you write more C++ than python, it will have a lower TimeToWriteCode. Despite having spent years writing python I don't find it any more productive than C++.
C++11 has all the nice features you might expect from python with the only drawback being the lack of a REPL.
- banachtarski 9y ago+1 people shouldn't overlook things that are bundled in the C++ stdlib now (chrono, random, thread, algorithm, mutex, containers, etc)
- cjalmeida 9y agoThey're great and incredibly useful. And one should not forget that you can easily use them in a Python extension written in C++14 and exported using Cython or SWIG.
- klibertp 9y agoThe lack of REPL compounds with long compilation times, which is practically a feature of C++ and not going to go away anytime soon. The effect is that, when you explore a new API or need to tune parameters to some function call deep in the call stack, you're an order of magnitude slower than with Python (or Lisp, Scala, F#, Haskell, or even Nim or plain C (b/c compilation times)). If you know exactly what you need to write, you're just as quick in C++ as in Python, that's true. Programming is mostly about learning what to write, though, and here C++ loses.
- kamaal 9y agoIf you are developing your code as a small tiny functions getting stitched later. Then writing unit test cases will solve this problem too.
- klibertp 9y agoNo, it will help with lack of REPL but not with long compilation times. Long compilation times are bad across the board. Go advertises "fast compilation" as one of its key features for a reason. EDIT: Not to mention, if you write your code as a lot of tiny functions you could just as well write it in C. Once you go for classes and templates, that's where C++ power is visible, but that's also where its compile times suck.
- TeMPOraL 9y agoWriting unit tests is nowhere near a replacement for a proper REPL.
- whyever 9y agoThere is a C++ REPL: https://root.cern.ch/cling https://root.cern.ch/cling
- 52-6F-62 9y agohttps://repl.it/ https://repl.it/ also provides C++ (and many more) support in an online version.
- cozzyd 9y agoMy time to debug code is usually smaller for C++, although I'm not familiar with the python tooling as much.