And prepare for wider audience in shitty “try” proposal after 1 July.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c99b3572-427c-4b7d-91ff-2fb4e4cb9177%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
And you must understand the specific: you are solving relatively hard problems developing language called Go with low mistake cost and we are solving simple problems with a DSL called Go but our mistake cost is much higher than yours.
I thought you are trying to be as practical as possible making a language with such a retarded yet somehow usable type system in XXI. But this recent proposal raises some suspicions...
And prepare for wider audience in shitty “try” proposal after 1 July.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu031bDbJheZ5-JUbsea1%2BYAn68dfO5ve8pn4T7%3DRFxqRQ%40mail.gmail.com.
Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules.
And prepare for wider audience in shitty “try” proposal after 1 July.
I wish we had a Zen of Go and followed it.
--Em sáb, 29 de jun de 2019 às 20:18, Denis Cheremisov <denis.ch...@gmail.com> escreveu:And prepare for wider audience in shitty “try” proposal after 1 July.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c99b3572-427c-4b7d-91ff-2fb4e4cb9177%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2B%3DiygtUkrJLW1jP9f-Q-YtgkjJnSGVg6rJYW%3DD8jvrjYZwWZw%40mail.gmail.com.
... I was surprised to see how poorly the discussion has gone. There are quite a few "me too" comments, a few image-only posts, some less than stellar personal conduct, and overall not a lot of nuanced discussion. I feel that perhaps these kinds of anti-proposals should be discouraged because they're inherently reactionary, which seems to get the discussion off on the wrong foot.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7573beb9-9c85-461d-9c3d-96b73b891c8b%40googlegroups.com.
> I will let Andrey speak for himself.
Since this is turning into a bit of fisticuffs I will quote my private
message to you for clarity, here it is:
Fortunately for the mankind both C++ and Java are dying
(no significant new projects announced for over 2 yrs afaik).
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20190630103854.5be358dd%40zuzia.
I for one like the try proposal. It removes much of my gripes with the verbosity of error handling.I think that it will become more readable than explicit error handling quite fast. Note that it is still explicit, if you don't use the try notation the error can be handled as it is now or ignored as it sometimes is now.I have a feeling that there is a quite large "silent majority" that pretty much agrees with me.
On Sat, Jun 29, 2019, 21:18 Denis Cheremisov <denis.c...@gmail.com> wrote:
And prepare for wider audience in shitty “try” proposal after 1 July.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c99b3572-427c-4b7d-91ff-2fb4e4cb9177%40googlegroups.com.
I have a feeling that there is a quite large "silent majority" that pretty much agrees with me.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGrdgiVU42ep%2BzJFUHc8FiZ_yQWrw2YOTCJEjMbLkyiFeC_C%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVJiXjVbxRCidDrN7hfwiftqs280on2fuwypPphJqpC1g%40mail.gmail.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/49411503-e6f1-4be7-ae39-57b55e782779%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20190701125733.4c41b9b2%40zuzia.
Checked exceptions address some of the difficulties with exceptions.
However, they introduce new difficulties, and I do not believe they
work in large-scale programs.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3ac00e65-7476-40b5-8328-3aef547e0541%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3ac00e65-7476-40b5-8328-3aef547e0541%40googlegroups.com.
If anyone hasn't seen it, an issue with the "proposal" tag was created earlier on the Go issue tracker titled "Proposal: leave "if err != nil" alone?" (here). This issue seems to have resonated with a lot of people, which may be an important data point when considering the try proposal, but I was surprised to see how poorly the discussion has gone. There are quite a few "me too" comments, a few image-only posts, some less than stellar personal conduct, and overall not a lot of nuanced discussion. I feel that perhaps these kinds of anti-proposals should be discouraged because they're inherently reactionary, which seems to get the discussion off on the wrong foot.That said, this anti-proposal attracted a whole new group of Go users that I don't remember from the original try proposal discussion, which was mostly dominated by ten or twenty participants. The discussion was better, but the number of active users was much smaller. I wonder if there's a way to better engage a larger portion of the Go user base while still encouraging healthy, technical discussion.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1284af52-5fd6-4cd0-9bd3-cc69fd1c2fc7%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/974016176.5469.1561999325924%40wamui-cheeto.atl.sa.earthlink.net.
> This issue seems to have resonated with a lot of people, which may be an important data point when considering the try proposal
Where were all those people when the Go Surveys were being taken the
last few years?
Think about how you would write a basic Go construct like
https://godoc.org/golang.org/x/sync/errgroup if errors are handled via
exceptions. I'm not saying you can't do it--of course you can do it.
But it seems to me that it would require a bunch of awkward
boilerplate that would be easy to get wrong.
If anyone hasn't seen it, an issue with the "proposal" tag was created earlier on the Go issue tracker titled "Proposal: leave "if err != nil" alone?" (here). This issue seems to have resonated with a lot of people, which may be an important data point when considering the try proposal, but I was surprised to see how poorly the discussion has gone. There are quite a few "me too" comments, a few image-only posts, some less than stellar personal conduct, and overall not a lot of nuanced discussion. I feel that perhaps these kinds of anti-proposals should be discouraged because they're inherently reactionary, which seems to get the discussion off on the wrong foot.That said, this anti-proposal attracted a whole new group of Go users that I don't remember from the original try proposal discussion, which was mostly dominated by ten or twenty participants. The discussion was better, but the number of active users was much smaller. I wonder if there's a way to better engage a larger portion of the Go user base while still encouraging healthy, technical discussion.
func statusUpdate() string { return "" }
if err != nil { return err }
if err != nil { return fmt.Errorf("I like to wrap my errors: %s", err) }
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/42b8fc5d-2f0a-4951-8ca5-0476e23fd4a7%40googlegroups.com.
I think you are confusing with ‘doing nothing as compared to the ‘try’ proposal’ with ‘do nothing’.
Go error handling is primitive at best, and people want a solution, just not the ‘try’ proposal - which is the basis of my comment email - go back to what is proven to work - Java and C++ are the dominant languages in use today, adding their exception based error handling to Go is ‘the way to Go” :)
> This issue seems to have resonated with a lot of people, which may be an important data point when considering the try proposal
Where were all those people when the Go Surveys were being taken the
last few years? Overwhelmingly, the people have voted error handling
as a major issue. The voters may not be intimately involved with Go
development and may not be willing to produce proposals, but the votes
are there and speak loudly. A vocal minority skewing the proposals
with downvotes should not be a cause to abscond something that server
the greater good.
If the status quo can not be breached, the worst we can do is another
round of the Go Survey and vocally invite everyone to participate.
On Sat, Jun 29, 2019 at 2:03 PM Burak Serdar <bse...@ieee.org> wrote:
>
> On Sat, Jun 29, 2019 at 1:45 PM Robert Engels <ren...@ix.netcom.com> wrote:
> >
> > If you don’t understand the history you are doomed to repeat it. The ‘try’ proposal is barely better than the current situation. There is as a reason exception handling with try catch was designed along with OO. It simplifies error handling immensely. “Try” as you might, you might think you are improving on it, but you’re not.
>
> I think try-catch simplifies writing error handling code, but not
> necessarily simplifies understanding or modifying it once it is
> written.
>
> I, too, like the if err!=nil {} as it is. One improvement I can think
> of is reducing the boilerplate by implementing a macro-like
> extension:
>
> func f() {
> handle openErr(err) error {
> return err
> }
> x, openErr:=os.Open(...)
>
> openErr would be called if the error is non-nil. Some months ago I did
> write a proposal similar to this, and I was not the only one thinking
> along the same lines. It is backward compatible, and the code is still
> readable in my opinion.
>
>
>
> >
> > Go should implement caught exceptions and be done with it. Stop trying to be cute. Take what works elsewhere and stop thinking you’re always the smartest person in the room.
> >
> > On Jun 29, 2019, at 2:35 PM, Tyler Compton <xav...@gmail.com> wrote:
> >
> > Sorry, forgot to CC on my last email. Here it is again:
> >
> >> And you must understand the specific: you are solving relatively hard problems developing language called Go with low mistake cost and we are solving simple problems with a DSL called Go but our mistake cost is much higher than yours.
> >
> >
> > Sorry, I'm not sure I understand. Who is the "you" and "we" in these circumstances? I should be clear, I'm not a Go core team member and I had nothing to do with the creation of the original "try" proposal. I've just been involved in the proposal and anti-proposal discussion and noticed a shift in tone.
> >
> >> I thought you are trying to be as practical as possible making a language with such a retarded yet somehow usable type system in XXI. But this recent proposal raises some suspicions...
> >
> >
> > What is XXI? Are you referring to Go's type system?
> >
> > On Sat, Jun 29, 2019 at 12:18 PM Denis Cheremisov <denis.c...@gmail.com> wrote:
> >>
> >> And prepare for wider audience in shitty “try” proposal after 1 July.
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c99b3572-427c-4b7d-91ff-2fb4e4cb9177%40googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu031bDbJheZ5-JUbsea1%2BYAn68dfO5ve8pn4T7%3DRFxqRQ%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/A4B77F76-E16F-4AE0-AAD4-29C553F079B0%40ix.netcom.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAMV2Rqq%2BeOZoyEVj-p%3DXJE3%3DUeA%2B%2B5ZLrTLp-SdxqVhxOqec9g%40mail.gmail.com.
If you’ve suffered through bad code due to exceptions, you would just be trading one ill for another. Exception handling when properly done is beautiful. Yes, a lot of people get it wrong, but they would probably get a lot of other things wrong as well. At least with exceptions, you have a stack trace - usually - :) - to help you figure out what they did wrong.
> On Jul 5, 2019, at 5:29 PM, andrey mirtchovski <mirtc...@gmail.com> wrote:
>
>> So I was quiet on the topic then - I am not now.
>
> i guess you missed the point where I advocated for a new survey, well
> advertised, where all the people who are fervent Go programmers but
> somehow neglected to fill out the Go surveys for three years running
> can cast their voice. "does go error handling need change: ◻️yes ◻️no
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
Some of us had to fix so much broken java/python code with invisible and anonymous goto statements (aka exceptions) that even just seeing the keyword try prompts a physical reaction.
His actual proposal paper is also an interesting read: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0709r3.pdf.
Harsh reactions stem from what experienced programmers see as `unintended consequences`
Did you ever read below the title
func f() (v value | e error) { ... }
3 of the most well-known new languages in the past decade (Swift, Rust, and Go, respectively) have all eschewed exceptions for control flow in favor of some sigil in the source code to propagate errors explicitly. Swift uses try-statements (along with a few other control flow constructs), Rust uses the "?" operator (previously the try! macro), and Go uses "if err != nil".C++, a language which does have exceptions, has significant fractions of its user base which disable exception support entirely (20% according to a survey) or partially (52%). Google, for instance, almost invariably compiles with -fno-exceptions and uses macros to propagate errors explicitly (see https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/stubs/status_macros.h#L49 to get a sense for how that works). Herb Sutter, one of the well-known members of the C++ standards committee from Microsoft, has proposals out to make propagating exceptions require a visible sigil in the source code (also a "try" expression, FWIW): https://youtu.be/os7cqJ5qlzo?t=2939 (an interesting talk overall, I've linked to the specific relevant time). His actual proposal paper is also an interesting read: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0709r3.pdf. In a table with the following introduction "This section lays out what I believe are ideal error handling characteristics. They are not unique to C++; I believe they apply to most modern languages", he lists "Unhandled error propagation is visible" as something not provided by C++ exceptions today.It's possible that a decade from now, this will all have been a minor blip, and you will eventually be proven right. But at the very least, this context that should inform your priors.SanjayPS - checked exceptions don't really have a great leg to stand on either (e.g. consider their interaction with Java 8's streams: https://www.oreilly.com/ideas/handling-checked-exceptions-in-java-streams, or consider that both Scala and Kotlin don't implement support for them at all)
On Sunday, June 30, 2019 at 7:34:54 PM UTC-7, robert engels wrote:I’ve developed systems that wrap checked exceptions in unchecked ones, but in every case I can think of it was to “abort to the top” - returning control (or exiting) - it is a specialized case of the re-throw, but I would argue it is rarely used in anything other than framework type code, with applications code typically wrapping the specific exception in an “higher-level application checked exception”, that the upper layers handle (possibly inspecting the “cause” exception.
As to not answering the question about transferring across Go routines, I apologize. It was not intentional - I read the statement a few times and didn’t quite get the concern - and meant to get back to it and forgot - but I read it again a few times and still don’t understand the problem.
What is particular about Go that makes this difficult? It is pretty common practice to pass exceptions across threads in Java and C++ - e.g. fork/join and the worker thread throws an exception - the exception is passed to the joining thread. Conceptually, it is as if the function was called serially and the exception thrown at the fork point. In these cases the exception is wrapped, but it has to be because of the strong type system. It is also pretty trivial to declare a wrapper function that declares the checked exceptions for clarity - this is done routinely in rpc using proxies.
> On Jun 30, 2019, at 8:43 PM, Ian Lance Taylor <ia...@golang.org> wrote:
>
> On Sun, Jun 30, 2019 at 5:23 PM robert engels <ren...@ix.netcom.com> wrote:
>>
>> I am going to disagree here. I don’t think ‘checked exceptions’ exhibit this behavior. Addressing the points from the Joeal article,
>
> Checked exceptions address some of the difficulties with exceptions.
> However, they introduce new difficulties, and I do not believe they
> work in large-scale programs. In practice, checked exceptions
> degenerate into unchecked exceptions. Changing the set of exceptions
> that a function throws forces all callers to adjust their set of
> exceptions. In practice this is so painful that programs catch
> exceptions and turn into them into unchecked exceptions. There are a
> number of discussions on the Interwebs about the problems with checked
> exceptions; here's one: https://www.artima.com/intv/handcuffs.html .
>
> I note that you didn't reply to my comment about passing errors across
> goroutines.
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWZEg091q2Z2bmNrbgewOPH-TMGnoc1hB4V44tMtGyzuw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20e08321-1c95-4663-a94e-604f62f838ac%40googlegroups.com.
—Sam
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2858C8AA-F25B-4415-A8D4-753DA679EC27%40samwhited.com.
On Fri, 12 Jul 2019, 07:22 Sam Whited, <s...@samwhited.com> wrote:
On July 12, 2019 4:35:54 AM UTC, Andrey Tcherepanov <xnow4f...@sneakemail.com> wrote:
>What these guys are proposing in that paper would be closer to
>(Go-style)
>func f() (v value | e error) { ... }
>
>(where "|" could be read as "or" or "union")
>
I've thought a tiny bit about how union or sum types would work in Go using a similar syntax. My initial thoughts are here in case this is of interest to anyone else:
https://blog.samwhited.com/2019/06/go-and-sum-types/As far as I can tell, that's almost identical to the scheme that I suggested here: https://github.com/golang/go/issues/19412#issuecomment-288485048
—Sam
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.