Safety and strong typing - Safety and strong typing Safety...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Safety and strong typing Safety One property that is sometimes looked for in a programming language is safety. There is some confusion as to what safety means, but here is a definition used in the year 2000 by an ad hoc committee that recommended that the Advanced Placement (AP) test in programming be based on the programming language Java: Safety: Any attempt to misinterpret data is caught at compiletime or generates a well- specified error at runtime. C and C++ are not safe. An array index operation b[k] in these languages may be allowed even though k is outside the range of the array. There is also no built-in protection against using pointer manipulation to access almost any part of memory. "Buffer overflow" akin to writing outside the boundary of an array is exploited by many computer viruses. Of course, a progammer can explicitly check for overflow, but the language does not require it....
View Full Document

Page1 / 2

Safety and strong typing - Safety and strong typing Safety...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online