开发者社区 问答 正文

Golang设计原则是什么?

Golang设计原则是什么?

展开
收起
钉群小二 2019-12-11 13:09:34 1018 分享 版权
1 条回答
写回答
取消 提交回答
  • 不定期更新钉群圈子活动等内容

    1.felicity of programming : 尽可能的简化代码编写规则,这点在各种解释语言,c++11等里面都可以体现一部分了,在golang上的体现就是如包的定义,编译安装,没有头文件,no forward declarations,:= 类型推断等等
    2.orthogonality of concepts : 另一个原则是概念设计尽可能正交orthogonal,这样理解使用会更简单。 Methods can be implemented for any type; structures represent data while interfaces represent abstraction; and so on. Orthogonality makes it easier to understand what happens when things combine.当然一旦设计正交,需要的概念也变得很少。
    3.speed of compilation
    来源于go语言中文网

    2019-12-11 13:10:45
    赞同 展开评论
问答分类:
Go
问答地址: