Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
a3db32d2
Commit
a3db32d2
authored
Apr 07, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Language FAQ: editing tweaks after iant.
R=iant CC=golang-dev
https://golang.org/cl/874043
parent
956926ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
go_lang_faq.html
doc/go_lang_faq.html
+3
-3
No files found.
doc/go_lang_faq.html
View file @
a3db32d2
...
...
@@ -282,14 +282,14 @@ This remains an open issue.
<h3
id=
"exceptions"
>
Why does Go not have exceptions?
</h3>
<p>
We believe that coupling
the usual idea of
exceptions to a control
We believe that coupling exceptions to a control
structure, as in the
<code>
try-catch-finally
</code>
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.
</p>
<p>
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment