Our look at the C++ implementation of arrays opens up a classic question: just h
ID: 3684748 • Letter: O
Question
Our look at the C++ implementation of arrays opens up a classic question: just how far should a programming language and the underlying operating system go to protect programmers from their own errors? Many systems, particularly those in scripted languages such as JavaScript or PHP, will try hard to keep a user from using invalid values in variables or array indexes. They will actively warn about suspicious lines of code. This protection is not free - such languages spend more time in compiling or interpreting, and their compiled code includes protective computer instructions. But they do "hold the hand" of the programmer and point out trouble.
C++ on the other hand does little such checking. It's attitude is, you're the programmer, you're a pro, you can take care of yourself. If you use a suspicious statement, you must have a good reason, I'm not going to interfere. And C++ compiles more quickly and generates code that runs faster and takes less memory.
So what do you think: how much should the compiler and OS try to help? Should they analyze and warn, or should they trust the programmer and do exactly as told?
Explanation / Answer
According to my view the program should analyze and warn because we may or may not have the correct code with a good syntax with us. so if the program didnot warn it may ruin our output. We see many cases in our daily life which allows to trust the programmer and do what exactly as told and many other they warn the programmer about the syntax issues .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.