TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

RFC Should functions have a color?

2 点作者 Merkur超过 9 年前
The title is a reference to http:&#x2F;&#x2F;journal.stuffwithstuff.com&#x2F;2015&#x2F;02&#x2F;01&#x2F; what-color-is-your-function&#x2F; a joyfull rant about async functions and promises.<p>I like to request your comment on a similar topic. While coding in go - I often find me asking: is this package go-routine save? Many times I find the answer in the doc&#x27;s or can ask on the internet, sometimes I need to look at the code.<p>&quot;go routine safety&quot; is just like the color in the rant of munificent.<p>On a current project I would like to assert that a user provided callback is a pure function - there we got another color!<p>those two colors are alike - they represent meta informations about an entity (function, package, struct) and they are about the behavior of the entity.<p>They also have something to do with boundarys - tho my English skills deny me to elaborate :(<p>I wounder...<p>Do you know other kinds of colors?<p>Is that coloring bothering you? And if not how do you approach it?

暂无评论

暂无评论