From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200305091646.h49Gks501287@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] same functions everywhere In-Reply-To: Your message of "Fri, 09 May 2003 14:21:25 BST." <622b8580ff4fa7e12cb655bf19694fe8@vitanuova.com> From: Dan Cross Date: Fri, 9 May 2003 12:46:54 -0400 Topicbox-Message-UUID: a5f30902-eacb-11e9-9e20-41e7f4b1d025 > exceptions are surprising things: they do not facilitate linear > reading of the code; they should be kept for genuinely surprising > conditions. I think this kind of depends on the syntax. I once saw a proposed syntax for Limbo (due to Michael Baldwin, inspired by Icon, perhaps) that I thought was really great; it looked something like: thing = function(foo, bar, baz); ! { exception handler, note bang } The ability to station an exception handler after a statement using the bang syntax gave one the `feeling' of programming without exceptions, but also allowed one to move the error handling to a potentially more appropriate place. You could write code like: if (a == SYMBOLIC_CONSTANT) { str := string arr; b := a / 2; mod = load Mod Mod->PATH; } ! { sys->print("Something bad happened.\n"); } It was very unintrusive, and I liked it a lot. - Dan C.