一个没有静态/编译语言经验的程序员应该从哪里开始学习Go语言?

huangapple go评论87阅读模式
英文:

Where should a programmer with NO static/compiled language exp start learning Go?

问题

我是一名经验丰富的软件开发人员,但我只在动态语言中工作过(主要是Python、过去的PHP、JavaScript和一点Ruby)。昨晚,当我意识到学习Go语言(语法、库等)可能会相当容易时,我发现自己正在阅读Go官网的教程,但我对静态/编译语言的了解不足可能会阻碍我轻松入门。并不是说我不理解静态语言的核心概念,即函数参数/变量/返回类型是静态的,程序必须在使用之前进行编译。更多的是,我不知道在编写程序之后该从哪里开始。例如,如果我使用Revel框架编写一个Web应用程序,它会为我处理这些步骤(根据网站上的说法)。这在静态语言的框架中是相当典型的吗?我是不是过于担心一个学习起来会很快的过程中的一个小部分,还是使用静态语言的形式(正如我所说的)相当繁琐?

英文:

I'm an experienced software developer, but I've only worked in dynamic languages (primarily Python, PHP in the past, JavaScript, and a little Ruby). Last night, I found myself reading through the tour on the Go website's tour when I realized that the language (syntax, libraries, etc.) would probably be fairly easy to learn, but my lack of knowledge about static/compiled languages would bar me from easy entry. It's not that I don't understand the core concepts of a static language, namely that function argument/variable/return types are static and that a program must be compiled before use. It's more that I don't know where to begin after writing a program. For instance, if I wrote a web application using the Revel framework, it would handle these steps for me (according to the website). Is that pretty typical of frameworks for static languages. Am I worrying too much about a small part of the process that will be quick to learn, or are the (as I call them) formalities of using a static language pretty cumbersome?

答案1

得分: 1

当然,实践是最重要的,还有阅读详尽的文档。我还发现这本书非常好Go语言书籍,它在每章的末尾都有一些练习题,非常不错。

英文:

Well obviously practice makes perfect, and reading through the extensive documentation. I also find this book really nice Go-lang book, it has some exercises at the end of the chapters which is nice.

答案2

得分: 1

只需获取所需语言的基本教程并按照教程进行操作。很快你就会学会如何构建程序。然后,你可以运用你目前的编程知识来实现你想要的功能。

英文:

Just get a basic tutorial for the language you want and follow it. You will soon pick up how to structure the program. You can then apply your current knowledge of programming to make it do what you want.

答案3

得分: 1

如其他人建议的那样,任何关于Go的教程都可以,你可能对动态->静态切换过于担心。对于来自动态类型世界的人来说,静态类型语言有时可能有点繁琐,但当你的类型不正确时,你会很快习惯于编译器的警告,并迅速修复它。最终,你会开始对此产生怀疑,并编写(大部分)类型正确的代码。

Rob Pike注意到,学习Go的人主要来自动态语言,这意味着切换并不那么困难。

互联网上有很多标题为“Go for <your language here>”的教程,比如“Go for Rubyists”,“Go for Pythonistas”,可以帮助你将现有知识映射到Go的概念上。但正如其他人强调的,正确学习Go的最佳(也许是唯一的)方法是参加教程并深入学习!至于书籍,标准的《Effective Go》或非常好的《Programming in Go》都是非常好的阅读材料,不论你的背景如何。

英文:

As other suggested, any tutorial on Go would work, and you probably worry too much about the dynamic -> static switch. Statically typed languages can be a bit cumbersome sometimes if you come from dynamic typing world, but you'll quickly get used to your compiler yelling at you when types are not correct, and quickly fix it. Eventually, you'll start double guessing it and write (mostly) type-correct code.

Rob Pike noticed that people coming to Go where coming mainly from dynamic languages, which means this cannot be all that hard to do the switch.

There are a lot of tutorials all over the internet titled "Go for <your language here>", such as "Go for Rubyists", "Go for Pythonistas" which can help you map your existing knowledge to Go concepts. But as other underlined, the best (only ?) way of properly learning go is to take a tutorial and dive in ! For the books, the standard Effective Go or the very good Programming in Go are very good reads, no matter your background.

huangapple
  • 本文由 发表于 2013年10月30日 00:52:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/19664465.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定