33

Golang 里一个有趣的小细节

 6 years ago
source link: https://zhuanlan.zhihu.com/p/44851211
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Recommend

  • 74

  • 119
    • 掘金 juejin.im 7 years ago
    • Cache

    callbag,一个有趣的规范

    push 和 pull 模型 如果你了解 RxJs,在响应式编程中,Observable 和 Obsever 是 push 模型,与之对应的,还有一个 pull 模型: Pull(f(): B):返回一个值。 Push(f(x: A): void):响应式

  • 93

    分享发现 - @dyxang - 暴力了一下挺好玩的,暴力磨的图片没有发出来,这是一个实例 http://nodtotherhythm.com/![shili]( https://oss.v2url.com/2018/02/1

  • 82
    • www.v2ex.com 6 years ago
    • Cache

    一个有趣的问题

    分享发现 - @qwertyegg - 你在酒吧独自喝闷酒,旁边来了个美女,手里拿两个硬币,要你陪她玩这么个游戏:每人一个硬币,每次两人一起给出正反面如果:1. 两个正面,你赢 3 块钱2. 两个反面,你赢 1

  • 28
    • studygolang.com 6 years ago
    • Cache

    Golang一些有趣的特性

    1、变量定义的几种方式 如: //方式一:普通定义 var a int = 1 fmt.Println("a = ", a) //方式二:类型推导 var b = 10 fmt.Println("b = ", b) //方式三:省略var name := "tom" fmt.Prin...

  • 8

    大纲

  • 8

    Windows 11任务管理器“效率模式”的一些有趣细节-51CTO.COM Windows 11任务管理器“效率模式”的一些有趣细节 作者:cnBeta 2022-02-22 12:54:37 目前,微软专注于CPU优化,因为它只想减少功耗。在...

  • 7
    • ijayer.github.io 3 years ago
    • Cache

    Golang | 关于 for range 的一些细节

    for range 的迭代变量会被重用 range expression 的副本参与 iteration 1. iteration variable 重用 for range 的 idiomatic(惯用)使用方式是使...

  • 2
    • yaoguais.github.io 3 years ago
    • Cache

    Golang细节梳理

    Golang细节梳理 熟话说,“工欲善其事,必先利其器”。接触Golang也近一年半,多次想梳理一下,都半途而废,这次趁着空闲,刚好可以一一记录下来。 内容多摘自《Go语言学习笔记》,或他人博文,或官方文档。形式为概括与代码结合,阐述也多以代码...

  • 7

    ahfuzhang 旧博客:https://ahfuzhang.blogspot.com/ 公众号:一本正经的瞎扯

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK