Giter Site home page Giter Site logo

effective-go-zh-en's Introduction

《Effective Go》中英双语版

Effective Go - 《实效 GO 编程》

Introduction

Go is a new language. Although it borrows ideas from existing languages, it has unusual properties that make effective Go programs different in character from programs written in its relatives. A straightforward translation of a C++ or Java program into Go is unlikely to produce a satisfactory result—Java programs are written in Java, not Go. On the other hand, thinking about the problem from a Go perspective could produce a successful but quite different program. In other words, to write Go well, it's important to understand its properties and idioms. It's also important to know the established conventions for programming in Go, such as naming, formatting, program construction, and so on, so that programs you write will be easy for other Go programmers to understand.

This document gives tips for writing clear, idiomatic Go code. It augments the language specification, the Tour of Go, and How to Write Go Code, all of which you should read first.

引言

Go 是一门全新的语言。尽管它从既有的语言中借鉴了许多理念,但其与众不同的特性,使得用 Go 编程在本质上就不同于其它语言。将现有的 C++ 或 Java 程序直译为 Go 程序并不能令人满意——毕竟 Java 程序是用 Java 编写的,而不是 Go。 另一方面,若从 Go 的角度去分析问题,你就能编写出同样可行但大不相同的程序。 换句话说,要想将 Go 程序写得好,就必须理解其特性和风格。了解命名、格式化、程序结构等既定规则也同样重要,这样你编写的程序才能更容易被其他程序员所理解。

本文档就如何编写清晰、地道的 Go 代码提供了一些技巧。它是对 语言规范Go 语言之旅 以及 如何使用 Go 编程 的补充说明,因此我们建议您先阅读这些文档。


Effective Go 作为 Go 语言的入门必读教程,值得每位初学者好好阅读一遍,编辑成书,方便阅读交流。


章节

  1. 前言
  2. 引言
  3. 格式化
  4. 注释
  5. 命名
  6. 分号
  7. 控制结构
  8. 函数
  9. 数据
  10. 初始化
  11. 方法
  12. 接口和其他类型
  13. 空白标识符
  14. 内嵌
  15. 并发
  16. 错误
  17. 一个 Web 服务器

改版说明:@2016.8.6 by bingoHuang, revision to Chinese & English version.

李笑来在他的新书 《人人都是工程师》 中说过一句话:在**,对绝大多数人来说,English + Computer Skills = Freedom(英语 + 计算机技能 = 自由)

我非常的赞同。英语和计算机技能是相辅相成,学习好一门编程语言(如 Go)的同时,还能加强英语学习,何乐而不为。所以我决定将本书改版成中英双语版,方便更多的人来学习阅读。

特别感谢 Go 官网提供的英文版教程。

感谢 hellogcc 提供的 中文翻译版一,这是我之前制作中文版电子书所参考的资料,翻译的很用心。

要更感谢 Go 语言中文社区 提供的 中文翻译版二,此翻译更贴切有味道,不可多得。本人已和 Go-zh 项目组 沟通过,获取了该社区的授权,故将此作为双语版的中文版本。

参考

参考官方英文版:Effective Go 英文版

参考中文翻译版一:Effective Go 中文版

参考中文翻译版二:Effective Go 中文版

Read, Fork and Star

下载

为了让大家更方便阅读,在此提供 网易蜂巢对象存储 的下载地址:

License

除特别注明外,本页内容均采用知识共享 - 署名(CC-BY)3.0 协议授权,代码采用 BSD 协议 授权。

effective-go-zh-en's People

Contributors

bingohuang avatar blindpirate avatar idealhack avatar lhx6538665 avatar liukgg avatar ziyitony avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

effective-go-zh-en's Issues

能把中英文分开么

感谢翻译,我平常阅读喜欢从上往下读。中英文混在一起,读起来经常会读重,不知道大家有没有同样的问题,
所以可以出个中英文分开的版本么,thanks

【问题求解】关于理解“new() 不会初始化内存,只会将内存置零”的疑问

社区的 gopher 们,大家好,本人最近在拜读此项目,理解上有些偏差,所以来此求解,希望能够得到一些帮助。

【问题】

项目 08_Data.md 一节中提到 “这(new 分配)是个用来分配内存的内建函数,……,它不会初始化内存,只会将内存置零。……”

请问这句话改怎么理解,它既然不初始化内存,怎么又有 T 的零值属性呢?我认为我对“什么是分配内存,什么是初始化内存”这个理解不对,请大佬们帮助一下。谢谢大家了。

求助

你好,我是北邮的一名学生。我对你的Mask Wearing Estimation with smartwatches项目很感兴趣,并作为了研究题目,关于参数我有几个不太懂的地方,请问你们愿意留下邮箱或微信号吗?在这两周我想进行一些付费咨询,感谢!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.