<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 13-Nov-07, at 2:47 PM, Bill Schwab wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Gary,<br><br>Agreed, with the caveat that I am currently thinking contexts are<br>preferred to exceptions in this case (for speed). </blockquote><div><br class="webkit-block-placeholder"></div><blockquote type="cite"><font class="Apple-style-span" color="#000000">[snip]</font><br><br>This reminds me of EndOfStream.&nbsp;</blockquote>Whoah, neddy!</div><div><br class="webkit-block-placeholder"></div><div>This really isn't much like that at all. An EndOfStream exception might possibly cause a noticeable slowdown in a tight stream based loop, assuming that the rest of the work being done in said loop is trivial. Having exceptions involved in compiling is hardly the same; compiling is a pretty big job!</div><div><br class="webkit-block-placeholder"></div><div>Having a 'signal exception' in your code costs nothing much, especially of course if it is not actually executed - the normal case. Actually raising the exception costs a scan of the execution stack - done in primitive code that is rather well written - with a check in Squeak code at each place where an exception handler context is found. If you had a really deep stack with an exception handler not relevant to your code at every other level (why it can't be at every level is left as an exercise for the student) then raising an exception would of course take some time.</div><div><br class="webkit-block-placeholder"></div><div>Compile speed is rarely much of an issue and hasn't been for decades in ST code. Unless of course you're loading megabytes of the stuff at a gulp, in which case I'd politely suggest your overall process sucks.&nbsp;</div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Palatino; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div><br class="khtml-block-placeholder"></div><div>tim</div><div>--</div><div>tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a></div><div>Useful random insult:- A room temperature IQ.</div></div><br class="Apple-interchange-newline"></span> </div><br></body></html>