Skip to content

Instantly share code, notes, and snippets.

@jschwinger233
Last active May 25, 2020 17:56
Show Gist options
  • Save jschwinger233/f0b14f62c628e00524e42743e869adac to your computer and use it in GitHub Desktop.
Save jschwinger233/f0b14f62c628e00524e42743e869adac to your computer and use it in GitHub Desktop.

另外两点想法

  1. gophers 都不会做并发抽象了

没有语言原生支持并发的时候, 大家有 pool, 有 future, 有 actor, 有 pubsub, 有好莱坞风格, 有双分派, 结果到了 go 里面, 全是裸的 channel 满天飞, 一个 switch case <-chan 能写六七个分支每个分支一屏幕的代码, 没有抽象, 只有原生的, 赤裸裸的, channel, 什么开放封闭, gopher 从不在意, 一扩展就加 case, 真是精妙的软件工程.

  1. 我就是想黑一下 rust

天天在 python 群里看人吹 rust, 拜托 rust 界连个能用的 etcdv3 客户端都没有, 求求你们别吹了.

不服自己去看看 etcdv3 watch 的实现, 你以为只是 grpc-rust 包装一下吗, 你错了, 里面的逻辑巨复杂, 一个 grpc stream 要 serve 任意数量的 watch stream, 发送必须有序但是接受 watch response 可以无序, 还要处理 auth 和出错重试, 重试的时候 watch stream 可一个都不能丢哟. 希望 rust 吹们闭上嘴多写代码, 谢谢.

另外 grpc-rust 的各种实现连集成 future3.0 + tokio 异步 IO 都挤牙膏一样挤不出来, 一群弱智, 可笑.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment