Hacker News new | ask | show | jobs
by kzisme 3356 days ago
Can anyone recommend Go learning resources for someone coming from a c# background?
5 comments

Not that I'm against learning new languages, but your question piqued my interest.

Are you thinking about transitioning from C# to Go? If so, is it because you think the language is cool or is it because in your region there are more/better paying Go jobs?

I ask this because I can't really imagine someone transitioning from C# to Go, especially these days that dotnet core is available. Hell, I'd first try to transition to F# :)

(Yes, I know that these are loaded questions and that I'm biased against Go..., but I think the questions are valid even in these conditions)

I'm still a "recent" grad, so my answer might be a bit strange.

I've been doing full time C# for almost 2 years now, and while I enjoy it one of my biggest fears is getting stuck into only knowing one technology/stack.

I don't have a professional need for using Go currently, but I've always had an interest in learning new languages.

Aside from those aspects - the people who implemented and worked on Go (Rob Pike and Ken Thompson in particular) I find very interesting.

If I'd want to diversify I'd probably look away from another Algol-inspired language. That's why I mentioned F#.

Go is an extremely practical language, maybe too practical, almost like C#. I'd rather look at something which takes a different approach, something which includes programming language research from the 90s, at least :)

So - functional languages are what you are referring to then?

My goal was/is to find something to work on in my spare time using a new language. Just to keep learning as well as broaden my horizons :)

As an aside, i love Go, and use it fulltime at work. With that said, i agree with the view that Go is boring, and not likely to expand you in the way you seek.

It's usually less rails oriented than C#, so you will figure out a lot of stuff for yourself, but in general it's quite boring (i like that). If you're interested in something interesting, i am in love with Rust, and definitely recommend it.

I don't personally use it these days, as i am not sure i want to invest in the tradeoff of safety vs prototyping speed. However i definitely recommend it as a cool language.

Functional languages and advanced type systems.
I'd say tour.golang.org is quite good. But the most important thing I feel for C# devs is to know that there is no Visual Studio like fancy IDE for Go.

People may be debate merits/demerits of this situation with valid arguments. However if you are in everything IDE camp Go might just not suit you.

Visual Studio Code is a free text-only "IDE" with very good support for Go (as well as other things like C#, TypeScript etc etc etc). Autocomplete/Intellisense, peek-/goto-definition, error-highlighting, git-integration, visual debugger, tabs, mini-map, extensions etc etc. Not sure what else you need really? Sure there is no GUI-builder, but then GUI in golang is in a very early stage.

I use it a lot for my work (Linux & Mac OSX) and personally at home too (Win10). I am not in any way connected to VS Code or MS, but I think it is a really good editor both for Go, but also for all of the other stuff it supports.

Intellij has one in the works. You can download and run the betas now.

https://www.jetbrains.com/go/

VS Code with the extension has nice autocomplete and navigation features (peek definition and such).
As a Java guy who has dabbled in Golang and I have had good luck with VSCode IDE + command line for compilation/build options. If you're in Windows, get Git Bash or similar for a unixy command line.
Which editor do you prefer?
I use VIM or Sublime with Go plugin.
Any specific VIM plugins for Go you can suggest?
+1 for sublime.
tour.golang.org is a good start to get familiar with the language's features. After that it is just worth picking a mini-project and getting cracking. The website https://gobyexample.com/ is a great place to see some simple, real-world examples once you start to actually try and do something.

There will be a lot that is familiar to a C#/Java dev, but also a lot of the stuff you might have got familiar with in C# is missing (famously generics are not there, but also other things like Linq etc has no native equivalent in go, although there are libraries that offer similar functionality).

Good luck! :-)

Picking a mini-project (without completely re-inventing the wheel) was the harder part for me - I did start out with tour.golang.org, and just reading their docs too.

I'll still checkout https://gobyexample.com/ - thanks for the link!

Golang is really, really easy to learn. And as always the key is practicing. Just pick up some medium size project and start building it. Stack overflow will help with the learning curve. This is how I learned to love Golang having 10+ years c# background​.
What sort of mini-projects have you done thus far?

That's the biggest hurdle I've been trying to overcome currently with learning Go (or any new language). Other than re-writing small problems, but that isn't terribly exciting.

There was a nice example of such a project recently in HN https://news.ycombinator.com/item?id=14073042
I was happy with the GOPL by Kernighan & Donovan, but I'm not a C# person, so I'm not sure what you want to skip/focus on?