dwb 9 days ago

Readability debates are usually boring because it’s so subjective, but in this case it’s just your (admitted!) unfamiliarity. Lots and lots of people would disagree with you that Go is unreadable. Go isn’t pretty or cute, but one of its strengths is its relative clarity. All languages require some familiarity to read properly.

  • anal_reactor 8 days ago

    > but in this case it’s just your (admitted!) unfamiliarity

    That's exactly the problem. Golang has syntax different from other imperative languages not because its syntax brings something new to the table, but just for the sake of being different. In other words, it's an entry barrier that provides nothing in return.

    To illustrate my point, imagine someone coming up with a new measurement unit "my_unit" equal to 0,73926745 cm. The first question is "why" because it solves zero problems for which the metric system would be impractical, while adding new cognitive load for people trying to use it. And then there's the counterargument "you're just not familiar with it!" which is a fair point because objectively, you can't say that either centimeter or "my_unit" is better. It's just that it's unnecessary cost of switching from already applied standard that works equally well.

    • dwb 8 days ago

      > Golang has syntax different from other imperative languages

      No it doesn’t, it’s very similar to C.

  • rkomorn 8 days ago

    > but one of its strengths is its relative clarity

    How you define "relative clarity" in a way that isn't "so subjective" and not immediately due to familiarity?

    To me it seems like you're saying it's all subjective except for Go's relative readability, but I'm not sure what's making said relative readability any less subjective.

    Am I reading your comment wrong?

    • dwb 8 days ago

      It is all subjective, but if a large number of subjects have a consistent opinion then that is something to take seriously rather than dismiss with absurd hyperbole (“most garbage”, “mostly unreadable”).

mathiaspoint 8 days ago

Admittedly I haven't touched go in around ten years so I'm sure things have changed but I remember being really surprised by how readible it was and how I could jump straight into codebases I had never seen before.

LambdaComplex 9 days ago

I would genuinely love to hear your specific complaints about Go's syntax.

  • dada216 8 days ago

    anal_reactor started with "once I read on 4chan". that's all you should need to know to skip this entirely

  • anal_reactor 8 days ago

    My first problem is "where the fuck is this function defined" and then "what is this type actually". Answering these two questions for random line in random code is surprisingly difficult.

    • majewsky 8 days ago

      > what is this type actually

      Do you mean that you don't know what type a certain variable has? If so, just add `theVariableName = false` and try to compile it (or just `go vet ./path/to/folder` from the repo root) and the error message will tell you the type. Same as with every other strongly typed language.

      • alain_gilbert 8 days ago

        Or if he was to use any kind of decent text editor, he could also just place his mouse over the variable and see the type it has.

        Then comes the hard part "where is it defined"... he could even press "command" and then click on it.