in reply to Re: The behavior is [sic] undefined
in thread The behavior is [sic] undefined
But undefined meant that all bets are off. It could do bizarre things including destroy the computer or make zebras fly out of the USB port. Calling through a stray pointer exhibits undefined behavior. One famous example in DOS would make the printer start spewing stuff (a failed BOUND instruction would call INT 5, if memory serves. MS decided to use that for the print-screen key instead of its intended purpose. Random garbage executed as code would hit that byte eventually.)
Since Perl 6 is more "confined" than C, I don't expect to have that very often. More usually, the implementation can choose from a range of allowed behaviors.
Sometimes, the allowed "ill-behaved" behavior is hard to pin down. For example, if you random-access a lazy list generated from a map that you promised was injective and idempotent, and the mapping block decides to return other than 1 value at some point, I can expect that list to be messed up, but the virtual machine won't crash, and strange things won't happen to global variables, etc.
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: The behavior is [sic] undefined
by BrowserUk (Patriarch) on May 13, 2009 at 19:31 UTC | |
by John M. Dlugosz (Monsignor) on May 13, 2009 at 20:23 UTC | |
|
Re^3: The behavior is [sic] undefined
by jdporter (Paladin) on May 15, 2009 at 02:42 UTC |