2016-04-21

Go for C# developers: Introduction

When I first started to learn Go a few months ago I compared a lot of things to things that was familiar to me; C#. And I decided to make a series of posts explaining some go-isms in C# (or .Net) terms as well as high-light some of the differences that are important to know about.

So going forward I will assume two things; you are a C# developer with good knowledge about how to write asynchronous code in C# and you also know the basics of Go (which you can easily get through the Go tour).

As an introduction I would also like to point out two observations I've made in learning Go. First of all the model of using channels reminded me a lot about CCR which I wrote a lot about in the past. Being familiar with a message based asynchronous programming model certainly helps when you want to learn Go but also remember that the recommendation is not to overdo things with go-routines and channels.

Then you need to approach Go with an open mind. When I was first looking for Go introductions somebody had written that whoever designed Go is a sadist as some things in Go are not the way things are in other languages and how it sometimes seems like Go works in a difference way just to screw with you. While whoever wrote that found this to be a problem I don't. It is true that some things in Go are borderline extreme in following certain computer science theories and it is true that the Go community seems to frown upon helpers for readability when there is a more verbose way of implementing something. For me personally it has not been a big deal to cope with the former while the latter sometimes becomes frustrating. But then I can just have my own helpers and nobody else needs to care about those so...

Anyway my point is; as you learn Go (as a C# developer) do not expect everything to be the way you are used to but rather embrace the fact that some things are a little different than you are used to. Trust me that for most of the part this is a good thing...

1 comment:

  1. I have just recently started learning and building with Go and have a lot of history with C# as well. I am looking forward to following this series.

    ReplyDelete