On 2010-12-04, alex23 <wuwe...@gmail.com> wrote: > On Dec 3, 2:12 am, Tim Harig <user...@ilthio.net> wrote: >> Actually, I thought that debate was resolved years ago. I cannot think of >> a single recently developed programming language that does not provide >> exception handling mechanisms because they have been proven more reliable. > > Google's Go lacks exceptions and I believe that was a deliberate > design choice.
1. The debate that I was referring to was between simple function checking vs. everything else. I didn't mean to automatically proclude any newer methodologies of which I might not even be aware. 2. I would consider the defer/panic/recovery mechanism functionally similar to exceptions in most ways. It allows the error handling code to be placed at a higher level and panics tranverse the stack until they are handled by a recovery. This is basically equivilent to how exceptions work using different names. The change is basically the defer function which solves the problem of any cleanup work that the function needs to do before the panic is raised. I like it, its nice. It formalizes the pattern of cleaning up within an exception block and re-raising the exception. I do have to wonder what patterns will emerge in the object given to panic(). Since it takes anything, and since Go doesn't have an object hierarchy, much less an exception hierarchy, the panic value raised may or may not contain the kind of detailed information that can be obtained about the error that we are able to get from the Exception objects in Python. -- http://mail.python.org/mailman/listinfo/python-list