Live data from Hacker News

Rewriting a large production system in Go

matt-welsh.blogspot.com

141–150 of 196 posts

Re: Rewriting a large production system in Go

#141
post #6

You know, every time I see some Googler shocked at the effectiveness and various advantages of coding in Go, I wonder why Google never adopted Erlang. They could have been getting all these same advantages (and then some) a decade ago :)

Erlang is slow

Re: Rewriting a large production system in Go

#142
post #2

> If I could get out of the 1970s and use an editor other than vi, maybe I would get some help from an IDE in this regard, but I staunchly refuse to edit code with any tool that requires using a mouse. So you've shown that Go is appealing to rigid curmudgeons. Personally I'm still hung up on the "every function (edit: that does anything which might itself return an error code, which in large scale code is quite a lot…

Exceptions are just glorified gotos. The longest single time in my life chasing a bug was because an exception was firing somehere down udner and nobody noticed, because it was kind of part of the logic but a fringe case.

Re: Rewriting a large production system in Go

#143
post #86

The number of strongly typed garbage collected compiled languages is surely shrinking. I can understand someone's disgust towards Java considering dwindling velocity in adding next-gen features and now sleeping in same bed as lawyer run Oracle. That pretty much had left C# in the arena until Go came on the scene. I was honestly hoping Go would give us head-to-head battle with C# but from initial looks Go pretty much…

I'd take a second look at Go. It has a number of innovations over C# - and of course also a number of shortcomings. It's quite a different language, much more so than Java compared to C# (1.0 even). A couple of things of the top of my head: * goroutines and efficient multithreading, both in terms of syntactical constructs and language implementation. Go doesn't have await/async because it fundamentally doesn't need t…

Did you ever actually use Go for a few minutes? Most of these bullet points are plain wrong.

Re: Rewriting a large production system in Go

#144
post #130

Earlier quoted context omitted.

Obviously, but the author is smart enough to acknowledge this and take it into consideration. So.. what's your point?

Original production code is messy, especially the ones that have been maintained over the years through multiple requirement changes. A rewrite will make those messiness go away, for now, regardless on languages used.

Never mind. The OP was a professor. That is how an academic paper is written: explicitly mentioning the real reason in just one or two sentences to avoid attacks from reviews, then associating a very minor or irrelevant fact to the phenomenon as the novel finding and main contribution of their work.

Re: Rewriting a large production system in Go

#145
post #106

Earlier quoted context omitted.

What would the static analysis that "vet" is performing enforce to stop this? No interface-to-interface downcasts?

eventually, within the context of the `go vet` tool, the http://godoc.org/code.google.com/p/go.tools/go/types package may be used to analyze interface conversions ("I said I expected interface type A, but I'm using it as interface type B", which is unusual for go programs). i think that answers "yes" to your second question, but I'm not on the go team, so take my opinion with a grain of salt. short of disallowing int…

Hmm. Seems hard to do soundly in the presence of higher order control flow (e.g. pass the interface to a closure in a global variable—will the closure downcast it to another interface you didn't expect?)

Re: Rewriting a large production system in Go

#146
post #34

Earlier quoted context omitted.

The joke goes, "If every other line of code you write starts with 'if err != nil', you might be a Go programmer."

No, we can just see the "if err != nil". It's still there in Java or Ruby or Python, lurking in the notional space between the lines and waiting to branch to an exception handler you installed in the caller's caller's caller.

Same in Go, because of panic and recover. For example, "foo.Bar", if foo is a nil pointer, can invisibly branch to an exception handler you installed in the caller's caller's caller.

Re: Rewriting a large production system in Go

#147
post #123

Earlier quoted context omitted.

> Now, quite possibly as consequence of the litigation, Java developers targeting Android have to live with Java the language version 6 forever. I suspect this was one of the motivations behind Dart.

Actually I did wonder about it at this year's Google IO, as it was hinted Dart is being used for some projects that would be in due time revealed. That is actually the only way I see any future for Dart.

Dart is excellent in few cases on the client. First, if you can forget about older browsers, and second if you don't need to use a lot of pre-existing JavaScript libs in your app, and third if you don't need to use the web control on iOS. Dart as a Chrome Packaged App should shine. I really enjoy developing in it. I don't have any experience with it on the server, so couldn't say there.

Re: Rewriting a large production system in Go

#148
post #95

Earlier quoted context omitted.

I did, and to be honest it is not much different than Microsoft with Visual J++. Without the "Google is cool glasses" on, I came to the conclusion that Google just took enough care to avoid all the legal traps that could make them loose a suit like it happened to Microsoft.

The president of Sun himself praised Google's Dalvik initiative. What legal trap were they trying to avoid here? http://www.techdirt.com/articles/20110724/11263315224/oracle...

Not having enough money to sue them, so the alternative was praise.

From James Gosling himself,

http://nighthacks.com/roller/jag/entry/my_attitude_on_oracle...

> Google totally slimed Sun. We were all really disturbed, even Jonathan: he just decided to put on a happy face and tried to turn lemons into lemonade, which annoyed a lot of folks at Sun.

Re: Rewriting a large production system in Go

#149
post #93
post #86

The number of strongly typed garbage collected compiled languages is surely shrinking. I can understand someone's disgust towards Java considering dwindling velocity in adding next-gen features and now sleeping in same bed as lawyer run Oracle. That pretty much had left C# in the arena until Go came on the scene. I was honestly hoping Go would give us head-to-head battle with C# but from initial looks Go pretty much…

Yep, Go would be hardly mentioned here if it wasn't being developed at Google. Having said this, Go can be a nice replacement for many use cases one would use C for.

Go seems to be gaining traction. Does it matter if that's because of where it came from? Maybe in a cultural, I-want-to-think-about-why-some-languages-get-adopted sense, sure, then it can matter. And I think it's worth having those discussions. But I get the impression that people think there's some absolute injustice in the idea that people are adopting a language, and it's partly because it's from Google. Consider:

"Yes, C would be hardly mentioned here if it wasn't being developed at Bell Labs."

Re: Rewriting a large production system in Go

#150

Earlier quoted context omitted.

I'd take a second look at Go. It has a number of innovations over C# - and of course also a number of shortcomings. It's quite a different language, much more so than Java compared to C# (1.0 even). A couple of things of the top of my head: * goroutines and efficient multithreading, both in terms of syntactical constructs and language implementation. Go doesn't have await/async because it fundamentally doesn't need t…

Did you ever actually use Go for a few minutes? Most of these bullet points are plain wrong.

Would you care to elaborate on this?
Post reply on HN