3 ms·
That is a given, I agree. But a complex program written in C++ (or using advanced C++ constructs) will scale much worse than a Python one, in my opinion.
by Kurtz79 14y ago
That is a given, I agree.
But a complex program written in C++ (or using advanced C++ constructs) will scale much worse than a Python one, in my opinion.
- netmare 14y agoI don't think that's necessarily true. In my opinion, both languages can be used by novices for simple scripts and by experts for complicated tasks. However, C++ seems to be getting easier for simple tasks (lambdas, initializers, auto, alias templates, etc.), while Python is getting more complex/powerful (metaclasses, exception tweaks, new I/O and function annotations — just to name a few).
- halfcat 14y agoMy experience has been the opposite in some cases, mainly due to C++ being statically typed, and having fewer implicit happenings. Yesterday I spent a chunk of my day debugging why my Python script reported that zero computers on the network were using DHCP. Apparently the Win32_NetworkAdapterConfiguration property DHCPEnabled returns 'True' or 'False' in Python (those are strings, not bools). In C++ that's a compile time error. The Microsoft documentation says DHCPEnabled is a bool. So between implicit functionality (evaluating strings as bools) and dynamic typing, this isn't screaming scalability to me. Yes, this is just one example, but it points to a whole class of errors that are lurking out there in production code. My guess would be, a complex C++ program written in the Lakos style would be more scalable than the equivalent Python program.
- Evbn 14y agoRuntimeError: cannot add String and Integer