▲ 1429 ▼ Golang be like (i.imgur.com) submitted 2 years ago by mycroftholmess@lemm.ee to c/programmer_humor@programming.dev 137 comments fedilink hide all child comments
[–] zorro@lemmy.world 53 points 2 years ago (4 children) Because that's sane and readable? permalink fedilink source parent hideshow 8 child comments replies: [–] fkn@lemmy.world 33 points 2 years ago (1 child) Wow. I'm honestly surprised I'm getting downvotes for a joke. Also, no. It isn't. It really isn't. permalink fedilink source parent hideshow 2 child comments replies: [–] gornius@lemmy.world 2 points 2 years ago (2 children) It is better than in most languages with exceptions, except from languages like Java, that require you to declare that certain method throws certain error. It's more tedious in Go, but at the end of the day it's the same thing. When I use someone else's code I want to be sure if that thing can throw an error so I can decide what to do with it. permalink fedilink source parent hideshow 4 child comments replies: [–] fkn@lemmy.world 3 points 2 years ago* Java doesn't have to declare every error at every level... Go is significantly more tedious and verbose than any other common language (for errors). I found it leads to less specific errors and errors handled at weird levels in the stack. permalink fedilink source parent [–] GlitchSir@lemmy.world 1 point 2 years ago You know it’s social media when the one that’s right is downvoted permalink fedilink source parent [–] r1veRRR@feddit.de 20 points 2 years ago (1 child) It's better than "invisible" exceptions, but it's still the worst "better" version. The best solution is some version of the good old Result monad. Rust has the BEST error handling (at least in the languages i know). You must handle Errors, BUT they are just values, AND there's a easy, non-verbose way of passing on the error (the ? operator). permalink fedilink source parent hideshow 2 child comments replies: [–] theneverfox@pawb.social 1 point 2 years ago* Beyond a quick "hello world" when it came out, I've never used rust, but that sounds pretty great permalink fedilink source parent [–] eestileib@sh.itjust.works 12 points 2 years ago I'm with you, exceptions sound good but are a bug factory. permalink fedilink source parent [–] herrvogel@lemmy.world -2 points 2 years ago There's nothing sane and readable about how Go insists you format dates and time. It is one of the dumbest language features I've ever seen. permalink fedilink source parent
[–] fkn@lemmy.world 33 points 2 years ago (1 child) Wow. I'm honestly surprised I'm getting downvotes for a joke. Also, no. It isn't. It really isn't. permalink fedilink source parent hideshow 2 child comments replies: [–] gornius@lemmy.world 2 points 2 years ago (2 children) It is better than in most languages with exceptions, except from languages like Java, that require you to declare that certain method throws certain error. It's more tedious in Go, but at the end of the day it's the same thing. When I use someone else's code I want to be sure if that thing can throw an error so I can decide what to do with it. permalink fedilink source parent hideshow 4 child comments replies: [–] fkn@lemmy.world 3 points 2 years ago* Java doesn't have to declare every error at every level... Go is significantly more tedious and verbose than any other common language (for errors). I found it leads to less specific errors and errors handled at weird levels in the stack. permalink fedilink source parent [–] GlitchSir@lemmy.world 1 point 2 years ago You know it’s social media when the one that’s right is downvoted permalink fedilink source parent
[–] gornius@lemmy.world 2 points 2 years ago (2 children) It is better than in most languages with exceptions, except from languages like Java, that require you to declare that certain method throws certain error. It's more tedious in Go, but at the end of the day it's the same thing. When I use someone else's code I want to be sure if that thing can throw an error so I can decide what to do with it. permalink fedilink source parent hideshow 4 child comments replies: [–] fkn@lemmy.world 3 points 2 years ago* Java doesn't have to declare every error at every level... Go is significantly more tedious and verbose than any other common language (for errors). I found it leads to less specific errors and errors handled at weird levels in the stack. permalink fedilink source parent [–] GlitchSir@lemmy.world 1 point 2 years ago You know it’s social media when the one that’s right is downvoted permalink fedilink source parent
[–] fkn@lemmy.world 3 points 2 years ago* Java doesn't have to declare every error at every level... Go is significantly more tedious and verbose than any other common language (for errors). I found it leads to less specific errors and errors handled at weird levels in the stack. permalink fedilink source parent
[–] GlitchSir@lemmy.world 1 point 2 years ago You know it’s social media when the one that’s right is downvoted permalink fedilink source parent
[–] r1veRRR@feddit.de 20 points 2 years ago (1 child) It's better than "invisible" exceptions, but it's still the worst "better" version. The best solution is some version of the good old Result monad. Rust has the BEST error handling (at least in the languages i know). You must handle Errors, BUT they are just values, AND there's a easy, non-verbose way of passing on the error (the ? operator). permalink fedilink source parent hideshow 2 child comments replies: [–] theneverfox@pawb.social 1 point 2 years ago* Beyond a quick "hello world" when it came out, I've never used rust, but that sounds pretty great permalink fedilink source parent
[–] theneverfox@pawb.social 1 point 2 years ago* Beyond a quick "hello world" when it came out, I've never used rust, but that sounds pretty great permalink fedilink source parent
[–] eestileib@sh.itjust.works 12 points 2 years ago I'm with you, exceptions sound good but are a bug factory. permalink fedilink source parent
[–] herrvogel@lemmy.world -2 points 2 years ago There's nothing sane and readable about how Go insists you format dates and time. It is one of the dumbest language features I've ever seen. permalink fedilink source parent