Answer the question
In order to leave comments, you need to log in
Hype around Rust and C?
Good evening!
How critical a problem for a programmer is manual memory management, which is called a flaw in the C language? The new programming language Rast is said to be free of this shortcoming, but does the number of errors in the program depend precisely on the presence or absence of manual memory management, does not the total number of errors redistribute to other flaws in the program or programmer after forced automatic elimination of errors with boundaries, and does not Are memory bugs programmer bugs, not compiler and programming language bugs, due to inaccuracies in formulating an algorithm using the language that would have gone the other way were it not for this possibility of erroneous use of memory?
Answer the question
In order to leave comments, you need to log in
In order:
How critical a problem for a programmer is manual memory management, which is called a flaw in the C language?
The new programming language Rust is said to be devoid of this shortcoming.
Isn't the total number of errors redistributed to other shortcomings?
Are memory errors programmer errors?
which would have flowed in a different direction were it not for this possibility of erroneous use of memory?
How critical a problem for a programmer is manual memory management, which is called a flaw in the C language?Unfreed memory (memory leak) is the most innocuous thing that can happen.
The new programming language Rust is said to be devoid of this shortcoming.
but does the number of errors in the program depend on the presence or absence of manual memory managementIn Rust, manual memory management, like in C and C++, is simply a culture that if a structure has allocated memory, then it will free it. All sorts of Vec, Box, etc. do it in Drop . In C++, many everyday types also deallocate the memory they have allocated in the destructor. However, in Rust there is a division into safe and unsafe code, and there are more than enough opportunities for safe application programming. In C++, all code is unsafe.
Isn't the total number of errors redistributed to other program flaws?No, it is not redistributed. A good type system can really get rid of many bugs, which makes the software generally more reliable. But you need to understand that nothing will save you from all mistakes. Banal discommunication with the customer generates a huge number of bugs.
whether errors with memory are errors of the programmer, and not of the compiler and programming languageOf course, this is a programmer's mistake. Programmers are usually people, and people make mistakes. And it's good when there are static analysis tools that help prevent errors before the software goes into production.
Hype around Rust and C?
manual memory management, which is called the disadvantage of the C language?
and whether memory errors are programmer errors,
Isn't the total number of errors redistributed to other flaws in the program or programmer?
whether errors with memory are errors of the programmer, and not of the compiler and programming language
Reducing the number of errors of one type does not affect the number of errors of other types. So in general, the number of errors is reduced. Probably.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question