Go语言支持类似于C语言中使用的面向对象风格。数据被组织成structs,然后定义操作这些structs的函数。
The Go language supports a style of object-oriented programming similar to that used in C. Data is grouped together into structs, and then functions are defined which operate on those structs.
本文中的例子使用的是面向对象的风格,但使用函数式方式可以获得同样的结果。
The examples in this article use the object-oriented style, but you can obtain the same results using a functional approach.
有两种风格的 PHP 数据库 API 函数:过程式的和面向对象的。
PHP database API functions are also made available in procedural style and in an object-oriented style.
应用推荐