From a3db32d2a641f8d2d8a0e37e8ae226134b85dd79 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 7 Apr 2010 16:13:14 -0700 Subject: [PATCH] Language FAQ: editing tweaks after iant. R=iant CC=golang-dev https://golang.org/cl/874043 --- doc/go_lang_faq.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/go_lang_faq.html b/doc/go_lang_faq.html index 2fd71936ba2..b8deb15343f 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