3 ms·
I continue to not be particularly excited by Go. My first thought when reading this code was "wow, that's a lot of verbosity mixed with a lot of line noise".
by jrockway 17y ago
I continue to not be particularly excited by Go. My first thought when reading this code was "wow, that's a lot of verbosity mixed with a lot of line noise". If this was Some Random Guy's project, nobody would have heard of it and nobody would care. But since Google is paying for it, it's suddenly amazing? No exceptions? Seriously?
If you want a better system programming language than C, why not use Haskell? If it is better than Go in perhaps every measurable way. And there is already an HTTP library that supports basic auth...
- dchest 17y agoJust a note: don't rely on my code to get a taste of language, because, obviously, it was "hacked together while learning a language" instead of "programmed". There are sources for packages on Go website http://golang.org/pkg/ http://golang.org/pkg/ that are written clearly.
- jrockway 17y agoI think all the problems with your code are Go problems, not problems with how you used it. Things like Twitter clients always look ugly in low-level languages, however.
- ptomato 17y ago"is better than Go in perhaps every measurable way" speed of execution, speed of compilation.
- jrockway 17y agoYes, you are perhaps right about speed of compilation. I do my Haskell hacking in the REPL, so the number of times I actually compile my projects is minimal. I have never thought, "this is taking way too long, what a drag". There may also be a factor of 2 execution speed advantage for a few things that Go lets you directly write in a CPU-friendly way. But the slow part of a Twitter client is waiting for Twitter. In fact, even Twitter isn't written in Go or Haskell or C, and it still works fine.
- ptomato 17y ago"But the slow part of a Twitter client is waiting for Twitter." Undoubtedly. But if we're going from the position of systems programming languages speed of execution is inevitably going to be a factor. And you did say every measurable way... so what other measurable ways did you have in mind?
- jrockway 17y agoI should have not used the word "measurable".
- flogic 17y agoPersonally, Ken Thompson and Rob Pike carry more weight than Google. Also it is much easier to reason about memory and CPU usage with Go than Haskell. I think of Go as occupying a different local maxima than Haskell.
- jrockway 17y agoBut it's much harder to reason about whether or not the program will return the correct answer.