<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">    > the restrictions seems reasonable but they add quirks to a mostly regular</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">    > language, take time to understand and explain to a beginner.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">    > It feels like they are not in the spirit of Oberon...all because of fear of</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">    > missing out on performance?</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">Good point. The implementation also has its quirks, but in the end</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">only adds a few lines of code to the compiler. The quirks from the</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">programmer’s point of view are indeed more problematic. How do</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">you explain to a programmer that he can’t make an assignment</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">*to* a case variable *inside* a case statement?</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">As I have stated earlier, I could live without the type CASE statement</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">and use only IS instead. I don’t think performance really matters all</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">that much, but I have no data to back this up - I just observe that in</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">a “typical” type case statement, e.g. in MenuViewers or TextFrames,</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">the case variable is not accessed all that often. So it’s hard to believe</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">that a few extra type guards will make a big difference.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">It’s sort of the same question, whether one should re-introduce the</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">numeric case statement, when one can use the (slower) IF instead.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">To be consistent, one should therefore perhaps say: Either one</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">keeps *both* the numeric CASE statement *and* the type</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">CASE statement, or neither of them. Would be a classical</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">Wirthian simplication. (numeric case statements already</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">are not implemented in the official Oberon-07 compiler).</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">Finally, there is still the issue of legacy code: From day one, the</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">type case statement (or WITH statement in earlier versions of</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">the language) has been used, eg in the Oberon viewer system.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class="">And in the documentation, in the books, etc. For 30+ years.</div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);" class=""><br class=""></div></body></html>