> So Go has panics and they are _just like exceptions_ in Python? Because to accuse the writer of being "flat out false" these have to be exactly the same
No, they don't. Because the claim that I called flat out false was this
>> No exceptions [...] If I want higher-level error context I need to propagate the error upwards, with an if at every function call along the way.
So, no, Go's exception mechanism doesn't have to be "just like Pythons" for this to be flat-out false. What it does need to be is anything that allows propagating errors up a call chain without an if at every function call along the way. Which panic/defer/recover is.
> And don't crate a new function that that is not what Python does.
Even if I did accept your "must work like Python" standard (which is, itself, wrong because its not necessary for the statement at issue to be flat-out false), what's the substantive difference between an immediately-called anonymous function and a block?
Sure, you could legitimately complain that the example would be more verbose in Go, but that's not the complaint OP made. (The most direct translation of your example would look something like this in Go -- though in practice you wouldn't really do this this way):
func() {
defer func() {
r = recover()
if e, ok := r.(SomeException); ok {
handle_exception()
} else {
panic(e)
}
}
dosomething()
}()
No, they don't. Because the claim that I called flat out false was this
>> No exceptions [...] If I want higher-level error context I need to propagate the error upwards, with an if at every function call along the way.
So, no, Go's exception mechanism doesn't have to be "just like Pythons" for this to be flat-out false. What it does need to be is anything that allows propagating errors up a call chain without an if at every function call along the way. Which panic/defer/recover is.
> And don't crate a new function that that is not what Python does.
Even if I did accept your "must work like Python" standard (which is, itself, wrong because its not necessary for the statement at issue to be flat-out false), what's the substantive difference between an immediately-called anonymous function and a block?
Sure, you could legitimately complain that the example would be more verbose in Go, but that's not the complaint OP made. (The most direct translation of your example would look something like this in Go -- though in practice you wouldn't really do this this way):