3 ms·
I was a python programmer before I became a c++ developer and believe it or not despite lack of type checking, big python apps have much less bugs then a compar
by Geminidog 6y ago
I was a python programmer before I became a c++ developer and believe it or not despite lack of type checking, big python apps have much less bugs then a comparable c++ app due in no part to offensive programming features built into python. In other words you don’t need to offensively program in python, it’s a given.
Firmware is just a pain in the ass to deal with. Wish there was a better way.
- ben-schaaf 6y ago> believe it or not despite lack of type checking, big python apps have much less bugs then a comparable c++ app Despite the lack of static typing, python has memory safety and a GIL; eliminating a much larger class of bugs, so it's not that hard to believe.
- Geminidog 6y agoAdditionally clear error messages similar to offensive programming. Any runtime error in python reads like a compile time error with the interpreter giving you the exact location where the error occured and what error occured. You'd be surprised how many c++ programmers think python is a terrible language just simply due to the lack of type checking and indentations. A lot of them have no idea how much easier and how much more productive life is outside of the c++ world. Take a look at the other replier. He's thinking "perhaps" it's true, he has no idea.
- rutthenut 6y agoFirmware requires serious design, code and test regimes to deliver safe, and reliable components. That same pain-in-the-arse requirement is true of other software, albeit higher-level platforms can perhaps save your arse when bugs are encountered
- Geminidog 6y agoNo. This shows a very narrow regime of experience. Testing is not the only way to verify software additionally the error surface area of certain languages is simply much much smaller in most languages outside of c++. This had nothing to do with a language saving your arse. This has everything to do with the simple non-existence of a type of bug in other languages, for example memory safety in rust and python. Additionally c++ often simply does not tell you where an error occurs and you have to use a coredump to figure everything out. It's not an offensive programming strategy by default. Python on the other hand makes every single type of error read like a c++ syntax error giving you a line number and an error type by default. Another thing to consider is raw speed and lower memory requirements. These are the only advantages of c++. If your hardware isn't strict on the above requirements consider micropython. I'm finding c++ programmers have this very narrow and cocky view of the world. They turn their nose up at languages like python without truly experiencing how much life is easier and more productive in those worlds.
- rutthenut 6y agoFar from narrow experience, C/C++ is just one of the languages I have used to deliver systems over a long period of time. Not being cocky and not turning my nose up at Python as I know it can be productive and allow quick creation of solutions. But pointing out that my experience has also encompassed high-resilience, high-availability, low-latency, fault-tolerance, high-security, air-gapped and embedded systems along the way. For the latter of those especially, the rigour of defining requirements and proving them during design and test phases, are key facets that go beyond the choice of any programming language whether modern or old.