Message from discussion
Go Error Handling Sucks
Received: by 10.50.36.199 with SMTP id s7mr3189736igj.3.1348509991490;
Mon, 24 Sep 2012 11:06:31 -0700 (PDT)
X-BeenThere: golang-nuts@googlegroups.com
Received: by 10.50.178.73 with SMTP id cw9ls3949615igc.4.canary; Mon, 24 Sep
2012 11:06:22 -0700 (PDT)
Received: by 10.50.40.165 with SMTP id y5mr3183844igk.4.1348509982348;
Mon, 24 Sep 2012 11:06:22 -0700 (PDT)
Received: by 10.50.40.165 with SMTP id y5mr3183843igk.4.1348509982334;
Mon, 24 Sep 2012 11:06:22 -0700 (PDT)
Return-Path: <d...@cheney.net>
Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169])
by gmr-mx.google.com with ESMTPS id us14si1285817igb.3.2012.09.24.11.06.21
(version=TLSv1/SSLv3 cipher=OTHER);
Mon, 24 Sep 2012 11:06:21 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.214.169 is neither permitted nor denied by best guess record for domain of d...@cheney.net) client-ip=209.85.214.169;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.214.169 is neither permitted nor denied by best guess record for domain of d...@cheney.net) smtp.mail=d...@cheney.net
Received: by obcva7 with SMTP id va7so2767904obc.14
for <golang-nuts@googlegroups.com>; Mon, 24 Sep 2012 11:06:21 -0700 (PDT)
d=google.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:cc:content-type:x-gm-message-state;
bh=cgoEcfVUrwE3ccmGeJK7Vf60LtolrU5hBX+O4Hvs+6E=;
b=MVg44wqhaDYCoevInlskdjuHKICIBgkXCxyMYyixWVkO9S7pcx9uHwPt9Ffv6I24im
x29KjxpQI3jljbukZjTpzXKzkiFJFEnOdwLmjhIhYBWz3IkBZr0r91v6mmih11MQ3MyH
33y+fBJKNcYooaJsOY2/gv8ZQ3UuGNsULVxFl4oMcxNlQivAPRYC97yTF58161brv233
H+PNdrh9G0BU+RuuQprpqHr3ZrTwleC9gNqGch8FQlicDq9Rza62YZqz+7B7MYfYVU16
SWsdablvZGqbnRx32Qvpzgxnab/MLG4rNJICbT246wXri42Ktgkj8tQEQ800Nptf1Asi
hw6A==
MIME-Version: 1.0
Received: by 10.182.31.102 with SMTP id z6mr10512410obh.66.1348509981521; Mon,
24 Sep 2012 11:06:21 -0700 (PDT)
Received: by 10.76.69.69 with HTTP; Mon, 24 Sep 2012 11:06:21 -0700 (PDT)
Received: by 10.76.69.69 with HTTP; Mon, 24 Sep 2012 11:06:21 -0700 (PDT)
In-Reply-To: <b114ff52-39fc-473f-afbc-3d94ce6fdc67@googlegroups.com>
References: <b114ff52-39fc-473f-afbc-3d94ce6fdc67@googlegroups.com>
Date: Tue, 25 Sep 2012 04:06:21 +1000
Message-ID: <CANp9fE__rD75En6cMafTp=BupAgc+xFAr9=qiCa6tBUpS7R...@mail.gmail.com>
Subject: Re: [go-nuts] Go Error Handling Sucks
From: Dave Cheney <d...@cheney.net>
To: knotwel...@gmail.com
Cc: golang-nuts@googlegroups.com
Content-Type: multipart/alternative; boundary=14dae93b595a6cb63d04ca7672f7
X-Gm-Message-State: ALoCoQnSznO/KAKJHQ9ffDCYp7eZY+yc3bL4ulaPUqZivaGiNFwb1XgQA4OjThM/7m8vbpW1GdHW
--14dae93b595a6cb63d04ca7672f7
Content-Type: text/plain; charset=ISO-8859-1
Hello,
If we are trading links, allow me to quote myself.
http://dave.cheney.net/2012/01/18/why-go-gets-exceptions-right
I hope you do not dismiss Go so quickly. If you spend some time using the
language, rather than being lead around by the great unwashed on reddit,
you may have an opportunity to change your mind.
Dave
On 25 Sep 2012 03:59, <knotwel...@gmail.com> wrote:
>
> Its a shame that such a fantastic language is missing a better way to deal
> with errors.
> Exceptions might not be perfect, but are damn better than checking each
> and every function call.
>
> Or am I missing something?
>
> I just read a pair of posts that expresses these ideas much better than
> what I could here.
>
>
> http://uberpython.wordpress.com/2012/09/23/why-im-not-leaving-python-for-go/
>
>
> http://www.yosefk.com/blog/error-codes-vs-exceptions-critical-code-vs-typical-code.html
>
> As one of the comments I read said: 99% of the time I need to code the
> happy path and if something breaks in the middle the error handling is
> exactly the same: log the error, close resources, send the caller an error
> code or message, end of the story. I don't want to check every freaking
> single function invocation for errors.
> Its a shame, I really wanted to use go.
>
> --
>
>
>
--14dae93b595a6cb63d04ca7672f7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<p dir=3D"ltr">Hello,</p>
<p dir=3D"ltr">If we are trading links, allow me to quote myself.=A0 </p>
<p dir=3D"ltr"> <a href=3D"http://dave.cheney.net/2012/01/18/why-go-gets-ex=
ceptions-right">http://dave.cheney.net/2012/01/18/why-go-gets-exceptions-ri=
ght</a></p>
<p dir=3D"ltr">I hope you do not dismiss Go so quickly. If you spend some t=
ime using the language, rather than being lead around by the great unwashed=
on reddit, you may have an opportunity to change your mind. </p>
<p dir=3D"ltr">Dave</p>
<div class=3D"gmail_quote">On 25 Sep 2012 03:59, <<a href=3D"mailto:kno=
twel...@gmail.com">knotwel...@gmail.com</a>> wrote:<br type=3D"attributi=
on"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex">
<div><br></div><div>Its a shame that such a fantastic language is missing a=
better way to deal with errors.=A0</div><div>Exceptions might not be perfe=
ct, but are damn better than checking each and every function call.</div>
<div><br></div><div>Or am I missing something?</div><div><br></div><div>I j=
ust read a pair of posts that expresses these ideas much better than what I=
could here.</div><div><br></div><div><a href=3D"http://uberpython.wordpres=
s.com/2012/09/23/why-im-not-leaving-python-for-go/" target=3D"_blank">http:=
//uberpython.wordpress.com/2012/09/23/why-im-not-leaving-python-for-go/</a>=
<br>
</div><div><br></div><div><a href=3D"http://www.yosefk.com/blog/error-codes=
-vs-exceptions-critical-code-vs-typical-code.html" target=3D"_blank">http:/=
/www.yosefk.com/blog/error-codes-vs-exceptions-critical-code-vs-typical-cod=
e.html</a><br>
</div><div><br></div><div>As one of the comments I read said: 99% of the ti=
me I need to code the happy path and if something breaks in the middle the =
error handling is exactly the same: log the error, close resources, send th=
e caller an error code or message, end of the story. =A0I don't want to=
check every freaking single function invocation for errors.</div>
<div>Its a shame, I really wanted to use go.</div><div><br></div>
<p></p>
-- <br>
=A0<br>
=A0<br>
</blockquote></div>
--14dae93b595a6cb63d04ca7672f7--