• fkn@lemmy.world
    link
    fedilink
    arrow-up
    44
    arrow-down
    13
    ·
    1 year ago

    Also Go: exceptions aren’t real, you declare and handle every error at every level or declare that you might return that error because go fuck yourself.

      • fkn@lemmy.world
        link
        fedilink
        arrow-up
        25
        arrow-down
        5
        ·
        1 year ago

        Wow. I’m honestly surprised I’m getting downvotes for a joke. Also, no. It isn’t. It really isn’t.

        • gornius@lemmy.world
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          1 year ago

          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.

          • fkn@lemmy.world
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            edit-2
            1 year 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.

      • herrvogel@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        4
        ·
        1 year 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.