Gotcha (programming)

In programming, a gotcha is a valid construct in a system, program or programming language that works as documented but is counter-intuitive and almost invites mistakes because it is both easy to invoke and unexpected or unreasonable in its outcome. == Example == The classic gotcha in C/C++ is the construct It is syntactically valid: it puts the value of b into a and then executes code if a is non-zero.

Source: Wikipedia — Gotcha (programming) (CC BY-SA 4.0)

Gotcha (programming)

In programming, a gotcha is a valid construct in a system, program or programming language that works as documented but is counter-intuitive and almost invites mistakes because it is both easy to invoke and unexpected or unreasonable in its outcome. == Example == The classic gotcha in C/C++ is the construct It is syntactically valid: it puts the value of b into a and then executes code if a is non-zero.

Source: Wikipedia "Gotcha (programming)" · CC BY-SA 4.0

Share this article: X · Bluesky
Privacy Policy