yazi

yazi

V2EX member #212385, joined on 2017-01-27 15:53:42 +08:00
Per yazi's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
yazi's recent replies
哈哈地址栏看到熟悉的网址(逃
@fgwmlhdkkkw 不错的文章,谢谢分享
@fgwmlhdkkkw 抱歉刚看到,先前我对这个也有一些疑惑,以下为我的理解(部分转述官方回复):

`[]E` 是非 interface 类型,因此不是一个适当的约束条件(参考 https://github.com/golang/exp/blob/master/constraints/constraints.go ,这里面的约束都是 interface 。在 beta2 时,这些约束被内置在了 Go 里,因此可以直接 `import "constraints"`;在目前 master ,这些约束又被抽离到了 `golang/exp` package )

因此如果想让他成为约束,需要这么写:`[T interface{ []E }, E any]`。但当 `E` 包含 `~` 或 `|` 时,它也被认为是一个 interface 约束。
@qfdk 目前是预览版本,不建议(也不应该)投入生产环境。在 Go 1.18 正式版发布后,该包也会发布正式版本。谢谢支持
Dec 3, 2021
Replied to a topic by oaza 职场话题 公司入职起花名
白猫
Feb 26, 2021
Replied to a topic by psw84 推广 回贴抽奖! 2021 NUC 黑果 下单抽牛年福袋
分母+1
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   875 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 19:08 · PVG 03:08 · LAX 12:08 · JFK 15:08
♥ Do have faith in what you're doing.