4 ms·
if ... { return failure } three(!) times in a row and then he writes: > Isn’t it pathetic that so many allegedly-mainstream languages don’t have HTTP librarie
by ExpiredLink 13y ago
if ... { return failure }
three(!) times in a row and then he writes:
> Isn’t it pathetic that so many allegedly-mainstream languages don’t have HTTP libraries that are this natural and idiomatic?
Isn’t it pathetic that a wannabe mainstream language doesn’t provide exception handling?
- jameskilton 13y agoExceptions are horrible if you're trying to make a fast, dependable, reliable, low-level, concurrent modern day programming language, as Go is. Exceptions are also horrible in that they never improve the readability and understandability of any code they exist in. The Go team, some of whom actually designed C back in the day, are well familiar with Exceptions, why they are bad, and explicitly chose to not implement them. So no, using the word "pathetic" implies a gross oversight. This was a very deliberate decision, and a good one at that.
- Fistandantilus 13y ago> Exceptions are horrible if you're trying to make a fast, dependable, reliable, low-level, concurrent modern day programming language, as Go is. Go is in no way "low-level", and if Go doesn't force you to check the returned error (hopefully it does), then it's not particularly reliable or dependable, either. It doesn't have much in the way of modern constructs such as pattern matching, generics, or compile-time guarantees, so I wouldn't say that it's really that modern, either. At least it did concurrency pretty well.
- Laremere 13y agoYou're excluding the comments which would be actual code to handle the very different events which all result in failure. Also, arguable only the first case would be something you'd want to throw an exception in a language which has them anyways. (Not getting a json response from a general http library is far from exceptional)