Skip to content

Some compilers allow a check during execution that…

“Some compilers allow a check during execution that subscripts do not exceed array dimensions. This is a help, but not sufficient. First, many programmers do not use such compilers because They're not efficient. (Presumably, this means that it is vital to get the wrong answers quickly.)” quote by Brian Kernighan
Download Open image
“Some compilers allow a check during execution that subscripts do not exceed array dimensions. This is a help, but not sufficient. First, many programmers do not use such compilers because They're not efficient. (Presumably, this means that it is vital to get the wrong answers quickly.)”

Brian Kernighan

About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Runtime checks for array bounds help catch errors, but they are inefficient and often unused, so they’re not a complete solution.

In simple terms: Bounds checks catch errors but are slow and rarely used.

Key Takeaway

Use static analysis and testing alongside bounds checks.

Themes

programming efficiency error handling software quality

Mood

analytical practical

Type

technical instructional

When to use this quote

  • software development
  • code review
  • educational curricula

Key Concepts

Computer science software engineering performance optimization

Questions to Reflect On

  • How can you balance safety and performance?
  • What alternatives exist to runtime bounds checks?
A Different Perspective

Reliance on checks can give false security if not combined with other practices.

★ ★ ★ ★ ★ No ratings yet

More by Brian Kernighan

Explore all 21 Brian Kernighan quotes

More Answers quotes

Browse all 7,843 Answers quotes