UVA 10310: Dog and Gopher (and Go language First Impression)
Created at 2016-07-01T04:00:07.000Z

For the record, it's totally coincidence that my first Go language experiment happens to solve this "Gopher" problem.

What I learnt

First Impression

  • Cons

    • Package system is confusing?
      • I'm not clear about the relation of package name and directory/file name yet.
    • Struct pointer concept is necessary
    • Too imperative and explicit (very subjective opinion)
    • Lack of polymorphism in data structure?

    • Whether to use struct or struct pointer can be one big implementation decision?
      • readability and efficiency trade-off?
  • Pros

    • Standard package documentation is very easy to navigate: https://golang.org/pkg/
    • Clean code base:
      • There's single imperative way of writing code
      • default go fmt
      • no compiler warning (compiler doesn't allow unused variable)

Future Work

  • Skim styleguide
  • Linting tool integration
  • Is there a way to compose ok-returning functions like Maybe monad?
    • I don't think so
    answerWriter, _ := os.Open("./p10310/sample.output")
    answer, _ := ioutil.ReadAll(answerWriter)