[go-nuts] Proposal: Error handling with else catch (else keyword)

2020-02-15 Thread teknoslo
This is more of a request for comments and not a complete proposal. I will try to keep this short(ish) and simple. Note that the `else` I will write about is not to be confused with the usual `else` used with `if`. It is an `else` in a slightly different context. `else` is basically an `if` wit

[go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-17 Thread teknoslo
Brian, you pointed out some important issues I was concerned about. Go does not and should not have any magic, so that is definitely a big problem. I also agree with you, that limiting the available expression syntax is not great and that else catch could make code non-obvious. Regarding doing

[go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-17 Thread teknoslo
> '?' is just a symbol that can be replaced by some another one > On Saturday, February 15, 2020 at 6:06:39 PM UTC-5, teknoslo wrote: >> >> This is more of a request for comments and not a complete proposal. I will >> try >> to keep this short(ish) and sim

Re: [go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-17 Thread teknoslo
I am not obsessed with try catch, I do not even like it. And I definitely do not want to copy it or have it in Go. As I said in the post, I like to *read* else catch with an implicit try before the function call and therefore named it else catch. And I think the else catch is not like try catch