Live data from Hacker News

Why Go is my favorite programming language

michael.stapelberg.de

231–240 of 256 posts

Re: Why Go is my favorite programming language

#231

Earlier quoted context omitted.

The entire category of "you need non-standard datastructures" works perfectly well on the JVM and .NET CLR, but is entirely useless in Go (thanks to missing generics).

Of course you can write non-standard data structures in Go. The fact that Go makes this more inconvenient or less efficient than languages that have generics is exactly why we compare the languages, not a reason for not comparing them as fnl has suggested.

It is always possible to compare any two things. The real question is if there's something interesting to learn.

We learned that the goroutines & channels concept isn't that bad an idea, but that it doesn't prevent you from stumbling over weird race conditions in large, distributed systems. Beyond that, at best one might argue if the lack of nearly all advanced programming features in Go is in itself a feature or a shortcoming.

However, I think that depends more on your personal preference on programming styles, so there's not much more to be learned from arguing about that. So that is why I see there's little that can be learned from any such comparison beyond what's well known already.

Re: Why Go is my favorite programming language

#232
post #230

Earlier quoted context omitted.

Here's what you said: >Go is an alternative for C (for services), PHP, and server-side JS. I don't understand why people keep comparing it to languages like C++, C#, D, Java, Rust, or Scala. Your claim was that there is no overlapping area of application and hence comparing the languages makes no sense. That is where we disagree if that is still your opinion. Besides, I see abolutely no reason why Go couldn't be used…

I think our semantical differences are mostly due that there I was referring to language level facilities, then, while even in that post I clearly underlined Go's utility for web development. As to transactional processing, there's a reason why that's not using GC languages and why the banking and oil industry are one of the few mainframe clients left. Just because you can do X with Y, it doesn't mean it's economical…

Don't underestimate how much our industry is driven by fashion, culture, corporate backing, historical coincidence and inertia. Very few decisions are based on technical merit. Go read some of those "why we switched from X to Y". It's 99% rubbish ex-post rationalization of nothingness.

In my opinion there is only one significant technical dividing line between language implementations: Mandatory automatic garbage collection.

No other purely technical characteristic makes a whole lot of difference for the sort of problems that can be solved with comparable results using different language implementations.

That's why it doesn't make much sense to me to put Go in a different basket than Java or C#. Doesn't mean there is no reason to prefer one over the other of course.

Re: Why Go is my favorite programming language

#233
post #231

Earlier quoted context omitted.

Of course you can write non-standard data structures in Go. The fact that Go makes this more inconvenient or less efficient than languages that have generics is exactly why we compare the languages, not a reason for not comparing them as fnl has suggested.

It is always possible to compare any two things. The real question is if there's something interesting to learn. We learned that the goroutines & channels concept isn't that bad an idea, but that it doesn't prevent you from stumbling over weird race conditions in large, distributed systems. Beyond that, at best one might argue if the lack of nearly all advanced programming features in Go is in itself a feature or a s…

I can say for myself that I am learning a lot from comparisons and even from language flame wars. They give me an incentive to think more deeply about the implications of particular features and architectures and avoid stumbling blindly into well known pitfalls.

Re: Why Go is my favorite programming language

#234
post #230

Earlier quoted context omitted.

I think our semantical differences are mostly due that there I was referring to language level facilities, then, while even in that post I clearly underlined Go's utility for web development. As to transactional processing, there's a reason why that's not using GC languages and why the banking and oil industry are one of the few mainframe clients left. Just because you can do X with Y, it doesn't mean it's economical…

Don't underestimate how much our industry is driven by fashion, culture, corporate backing, historical coincidence and inertia. Very few decisions are based on technical merit. Go read some of those "why we switched from X to Y". It's 99% rubbish ex-post rationalization of nothingness. In my opinion there is only one significant technical dividing line between language implementations: Mandatory automatic garbage col…

If your baskets are GC vs. managed languages, I fully agree. But I don't think that comparing some contents in either of those baskets among each other necessarily is a task worth tackling...

Re: Why Go is my favorite programming language

#235
post #225

Earlier quoted context omitted.

Just as in the other thread, the only unfounded claim is that Go provides similar facilities as Java or C# at language level. Go was explicitly designed to avoid all that, after all. So comparing those three at language level only surfaces a long list of things you can do in Java, and an even longer one for C#, but not in Go.

That makes absolutely no sense. Languages with very different features can be used for solving very similar problems and hence a comparison can be useful.

The keyword here being "different". I don't think that the utter absence of features is terribly interesting. To me, that's just a matter of taste.

Re: Why Go is my favorite programming language

#236

Earlier quoted context omitted.

I'll take Either where I can guarantee I know what I'm dealing with and that it's dealt with rather than the honors system Go offers.

Go is basically using multiple return values as a half baked Either type, only you're on your own if you want to pass it over a channel or store it anywhere.

Sadly go can't even half bake a sum type suitable for this work without generics.

Re: Why Go is my favorite programming language

#237
post #231

Earlier quoted context omitted.

It is always possible to compare any two things. The real question is if there's something interesting to learn. We learned that the goroutines & channels concept isn't that bad an idea, but that it doesn't prevent you from stumbling over weird race conditions in large, distributed systems. Beyond that, at best one might argue if the lack of nearly all advanced programming features in Go is in itself a feature or a s…

I can say for myself that I am learning a lot from comparisons and even from language flame wars. They give me an incentive to think more deeply about the implications of particular features and architectures and avoid stumbling blindly into well known pitfalls.

That, finally, is something I can underwrite 100%, too! :-)

Re: Why Go is my favorite programming language

#238
post #234

Earlier quoted context omitted.

Don't underestimate how much our industry is driven by fashion, culture, corporate backing, historical coincidence and inertia. Very few decisions are based on technical merit. Go read some of those "why we switched from X to Y". It's 99% rubbish ex-post rationalization of nothingness. In my opinion there is only one significant technical dividing line between language implementations: Mandatory automatic garbage col…

If your baskets are GC vs. managed languages, I fully agree. But I don't think that comparing some contents in either of those baskets among each other necessarily is a task worth tackling...

So if I'm starting a new project and I know that I can achieve the same result with either Go or Scala, how do I choose without comparing?

Re: Why Go is my favorite programming language

#239
post #234

Earlier quoted context omitted.

If your baskets are GC vs. managed languages, I fully agree. But I don't think that comparing some contents in either of those baskets among each other necessarily is a task worth tackling...

So if I'm starting a new project and I know that I can achieve the same result with either Go or Scala, how do I choose without comparing?

What I meant is that the lack of features in Go has made it easy for us: All existing comparisons are probably sufficient.

All you need to decide on now is if you prefer syntactic simplicity over percieved feature boat, if it's a web development project or not, and if you can benefit from existing code in your language of choice or not.

Pick at least 2/3 to decide... :-)

Re: Why Go is my favorite programming language

#240

Earlier quoted context omitted.

I didn't talk about multiple return values, did I? Every language has error handling support, some languages hijack an exception mechanism as a control flow path for non-exceptional error states. Returning error values is more ergonomic than exceptions, but Go's lack of sum types makes this slightly tedious (still better than exceptions).

Right, I jumped ahead; multiple return values is the how Go returns error values, it's not error handling itself. I don't like exceptions much either, but sum types / ADTs are just so nice for this sort of thing.

I agree that sum types are nicer, but I don't see how they constitute error handling in a way other return mechanisms do not. The difference isn't categorical, it's ergonomic.
Post reply on HN