01 2022 档案

摘要:go程序设计语言第八章-goroutine and channel 8.1 goroutines In Go, each concurrently executing activity is called a goroutine. If you have used operating system 阅读全文
posted @ 2022-01-26 17:57 影随风动91 阅读(32) 评论(0) 推荐(0) 编辑
摘要:本章主要介绍组合类型(composite type)中的array、slice、map、struct。 Slice slice的组成 A slice has three components: a pointer, a length, and a capacity. slice由三个部分组成:指针, 阅读全文
posted @ 2022-01-07 17:19 影随风动91 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Golang:“闭包(closure)”到底包了什么? golang 闭包 Golang中闭包的理解 什么是闭包呢?摘用Wikipedia上的一句定义: a closure is a record storing a function together with an environment. 闭包 阅读全文
posted @ 2022-01-07 09:39 影随风动91 阅读(14) 评论(0) 推荐(0) 编辑
摘要:字符集,用一张或多张由多行多列的二维表构成。 二维表中行与列相交的点,称为code point,码点。一个码点值(即码点编号)就是对应字符的编号,索引码点值有时 可以直接称为字符编号。【那么字符编号最大是多少?】 字符集中所有码点数量的总和,称为编号空间。 Unicode标准,将字符按照类别划分到0 阅读全文
posted @ 2022-01-05 17:54 影随风动91 阅读(58) 评论(0) 推荐(0) 编辑
摘要:方法method receiver p selector 形如p.X或p.Path() go可以让任意类型添加方法,可以为一个named type添加方法,只要它的底层不是指针或接口。 当receiver为指针类型时,实例类型调用方法会自动取地址然后调用, 这仅限于变量,包括结构体成员,数组成员,s 阅读全文
posted @ 2022-01-05 16:52 影随风动91 阅读(18) 评论(0) 推荐(0) 编辑
摘要:函数 函数的类型称为函数签名: func signature。 两个函数有相同的参数类型列表和相同的返回结果类型列表,则类型即签名相同。 go没有默认参数和带名称参数。 函数参数通过值复制,因此函数接收的是每个参数的副本。 go的垃圾回收会清理无用的内存,但不会清理系统资源,如打开的文件描述符。 在 阅读全文
posted @ 2022-01-04 18:28 影随风动91 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Go is a compiled language. Go natively handles Unicode, so it can process text in all the world’s languages. Exercis e 1.3: Experiment to measure the 阅读全文
posted @ 2022-01-04 11:45 影随风动91 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Its facilities for concurrency are new and efficient, and its approach to dat a abstraction and object-oriented programming is unusually flexible. It ha 阅读全文
posted @ 2022-01-04 09:38 影随风动91 阅读(9) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示