当前位置: 首页 > news >正文

网站建设 业务走下坡整站优化案例

网站建设 业务走下坡,整站优化案例,网站开发开源软件,台州网站建设解决方案定义说明 静态类型(static type):在编码时就能确定的类型,通过变量定义可以确定的类型;动态类型(concrete type):在运行时才能确定具体的数据类型; 动态静态类型如何理…

定义说明

  • 静态类型(static type):在编码时就能确定的类型,通过变量定义可以确定的类型;
  • 动态类型(concrete type):在运行时才能确定具体的数据类型;

动态静态类型如何理解?

go 语言中interface(any)可以承接所有类型的数据,所以这部分只有具体运行的时候,才能确定数据具体类型:

	var i interface{}var num int = 1var str string = "hello world"i = numi= str

在该示例中,第一行声明了一个interface的变量i,在编码时就可以确定了,所以i的静态类型就是interface;
同理,第二行num的静态类型为int,第三行str的静态类型为string
第四行,把num赋值给inum的实际类型是int, 所以此时,i的动态类型就是int
第五行,把str赋值给inum的实际类型是string,所以此时,i的动态类型就是string

Golang 中的interface的底层延申:

golang 中interface有两种含义/用法:

  1. 常规的接口类型,有一些带实现的接口定义
  2. 表示任意数据类型any

golang 的底层实现也是根据这两种情况做了不同的实现,底层分别对应ifaceeface

// 空接口结构
type eface struct {_type *_type			// 实体类型data  unsafe.Pointer	// 数据地址
}// 包含方法的结构
type iface struct {tab  *itab			// 接口和实体类型data unsafe.Pointer	// 数据地址
}type itab struct {inter *interfacetype_type *_typehash  uint32 // copy of _type.hash. Used for type switches._     [4]bytefun   [1]uintptr // variable sized. fun[0]==0 means _type does not implement inter.
}type interfacetype struct {typ     _typepkgpath namemhdr    []imethod
}type imethod struct {name nameOffityp typeOff
}type _type struct {size       uintptrptrdata    uintptr // size of memory prefix holding all pointershash       uint32tflag      tflagalign      uint8fieldAlign uint8kind       uint8// function for comparing objects of this type// (ptr to object A, ptr to object B) -> ==?equal func(unsafe.Pointer, unsafe.Pointer) bool// gcdata stores the GC type data for the garbage collector.// If the KindGCProg bit is set in kind, gcdata is a GC program.// Otherwise it is a ptrmask bitmap. See mbitmap.go for details.gcdata    *bytestr       nameOffptrToThis typeOff
}type nameOff int32
type typeOff int32
type tflag uint8
http://www.yidumall.com/news/40340.html

相关文章:

  • 网站建设 拖欠尾款怎样找推广平台
  • 温州市建设小学网站微信引流推广怎么找平台
  • 龙岗营销网站建设公司哪家好百度指数数据官网
  • 外贸网站建设服务商西安网络优化大的公司
  • 德州市建设工程质监站网站广州网络推广专员
  • 开发一套网站价格徐州seo外包平台
  • 杭州企业网站建设公司潍坊百度关键词优化
  • 企业信息系统是什么seo网站推广服务
  • app网站建设源码百度推广助手电脑版
  • 做网站公司怎么样网站建设百度推广
  • 怎么做网站访问统计站长工具seo词语排名
  • 微信嵌入网站开发网络推广公司服务内容
  • 移动端显卡天梯图2022搜索引擎优化的内容包括
  • 程序员自己做网站赚钱淘宝关键词排名怎么查询
  • 360提示网站有风险真的有吗seo优化服务
  • 深圳建设工程信息网查询系统seo托管
  • dw怎么做网站跳转网坛最新排名
  • 网页制作与网站建设作业整合营销传播的六种方法
  • 网站系统建设常用的网络营销方法及效果
  • 论坛与网站做优化哪个更好信息流优化师
  • 做h5哪些网站好 知乎电商网站入口
  • 男和女做暖暖网站网络推广都有哪些平台
  • 给网站添加后台长尾关键词挖掘精灵官网
  • 免费物流公司网站模板百度快照不更新怎么办
  • 网站域名跳转域名查询138ip
  • wordpress文件大小超过上传限制合肥优化排名推广
  • b2b网站推广的效果网络推广工具和方法
  • jsp 网站建设百度权重是什么
  • 江门网页制作seo网站查询
  • 如何查询网站建站时间长安网站优化公司