From: Rob Pike Date: Wed, 7 Apr 2010 23:13:14 +0000 (-0700) Subject: Language FAQ: editing tweaks after iant. X-Git-Tag: weekly.2010-04-13~47 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a3db32d2a641f8d2d8a0e37e8ae226134b85dd79;p=gostls13.git Language FAQ: editing tweaks after iant. R=iant CC=golang-dev https://golang.org/cl/874043 --- diff --git a/doc/go_lang_faq.html b/doc/go_lang_faq.html index 2fd71936ba..b8deb15343 100644 --- a/doc/go_lang_faq.html +++ b/doc/go_lang_faq.html @@ -282,14 +282,14 @@ This remains an open issue.

Why does Go not have exceptions?

-We believe that coupling the usual idea of exceptions to a control +We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as -exceptional. And then the type system gets mixed in. +exceptional.

-Go takes a different approach. Instead of exceptions, it has couple +Go takes a different approach. Instead of exceptions, it has a couple of built-in functions to signal and recover from truly exceptional conditions. The recovery mechanism is executed only as part of a function's state being torn down after an error, which is sufficient