¿Cuándo es apropiado usar C++ en lugar de un lenguaje de nivel superior? [cerrado]
Frecuentes
Visto 225 veces
-5
When is the use of C/C++ more appropriate than the use of very high level programming languages like python?
1 Respuestas
5
Countless reasons...
- You need to use an essential library that works best in C or C++
- You are not interested in learning a new language
- You need to access system APIs or resources not available in Python
- Your project structure is better suited for the syntax of C or C++
- You want to use features of C or C++ that you cannot get in Python, most notably compile-time checks. Or you know,
switch
Declaraciones. - External tool support, for example static analysis is much harder for Python.
- Rendimiento
- The project is already written in C++ and you don't want to port it
- You want to ensure that it can be run on a minimal installation without an interpreter
- You need debugging info from the client machine in the form of a debuggable minidump
- simplemente no como Python
...
Respondido 28 ago 12, 12:08
While i agree with the points listed, in cases where python has the modules that allow you to do OS specific low level tasks (eg packet capture), the use of C++ can be challanged - yohannista
@user1470033 -- Sure. Ultimately we have a whole bunch of programming languages because they're all good at one thing or another. Just choose a language that is suited for the task at hand. - mgilson
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas programming-languages or haz tu propia pregunta.
Why use Python? If you have a reason, use it. I personally only use C, C++, JavaScript, Bash and occasionally Perl (when Bash isn't good enough). - Šimon Tóth
Ever try writing a driver in python? Or almost anything that interacts with hardware at a low level - Daniel Gratzer
If you are developing a compute intensive & multi threaded application, use C/C++ since Python suffers from GIL (Global Interpreter Lock). Since most userspace applications have IO mixed with compute, Python is good enough and you will gain through increased productivity. For anything in kernel space, you have no choice but to use C/C++. - 0xdky
I post a line here which explains why not to use Python. But I don't think so it will answer your cause. stackoverflow.com/questions/371966/… not sure if you checked upon the below discussion. programadores.stackexchange.com/questions/113295/… y programadores.stackexchange.com/questions/29109/… - verisimilitude
I'm thinking for most applications python is fast enough
. Partially agree with this. When it comes to performance, nothing can beat C. - verisimilitude