On Tue, May 21, 2024 at 2:12 PM Luther Johnson <luther.johnson(a)makerlisp.com>
wrote:
I like this anecdote because it points out the
difference between being
able to handle and process bizarre conditions, as if they were something
that should work, which is maybe not that helpful, vs. detecting them and
doing something reasonable, like failiing with a "limit exceeded" message
That is in fact precisely how the DEC compiler handled the 100 nested
parentheses condition.
. A silent, insidious failure down the line because a
limit was exceeded
is never good.
Amen! One should always do bounds checking when dealing with fixed-size
aggregate data structures. One compiler that I worked on got a bug report
of bad code being generated. The problem was an illegal optimization that
never should have triggered but did due to a corrupted data table. Finding
the culprit of the corruption took hours. It finally turned out to be due
to overflow of an adjacent data table in use elsewhere in the compiler.
The routine to add another entry to that table didn't check for table
overflow.
-Paul W.