Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go needs exceptions! #75

Closed
gopherbot opened this issue Nov 12, 2009 · 2 comments
Closed

Go needs exceptions! #75

gopherbot opened this issue Nov 12, 2009 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by rblaak:

I understand the tradeoffs explained in the language spec. However, in a 
modern language, the lack of an ability to abort control flow leads to 
very poor coding styles. 

It results in an error result code programming style that is very fragile, 
since callers have to be disciplined to pay attention to result codes. It 
is also more work to continuously pass errors up the call chain.

With exceptions, errors cannot be ignored by accident, and that leads to 
better code by default.

You are taking the trouble to implement garbage collection. The same 
reasons apply to having an exception mechanism: it relieves tedium from 
the programmer, and makes code safer.

Use .NET or C++ as a guide for exceptions, not Java. Checked exceptions 
tend to force naive programmers to catch and swallow them to shut up the 
compiler, which leads to the worst of all possible worlds: errors that are 
silently ignored.
@agl
Copy link
Contributor

agl commented Nov 12, 2009

Comment 1:

We're not preluding the addition of exceptions in the future, but the bug tracker is
best 
suited to tracking precise issues. The mailing list is better for discussion these sorts
of 
topics.
So I'm closing this bug, but please understand that it's not a rejection of your idea,
just 
that we use our bug tracker differently.
Cheers

Status changed to WontFix.

@gopherbot
Copy link
Contributor Author

Comment 2 by rblaak:

No problem. I posted this to the mailing list.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants