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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Code isn't poetry

11 点作者 tholex大约 11 年前

4 条评论

jloughry大约 11 年前
Pedantic is putting the braces in even where they&#x27;re optional, simply because it avoids problems later on. Pedantic is using Yoda conditionals [1] in C because it enables lvalue checking in the compiler. Pedantic is checking return codes, using assertions, and validating inputs. Pedantic is not unnecessary code; it recognizing what is necessary, and doing it.<p>[1] E.g., &quot;if (1 == n)&quot; instead of &quot;if (n == 1)&quot; (or prefer a language that uses := for assignment).
solomone大约 11 年前
Any syntax is less readable if you&#x27;re unfamiliar with it. If you see enough of them, it reads naturally.
otikik大约 11 年前
I don&#x27;t agree that the second example is more readable than the first
ratsimihah大约 11 年前
But it is!
评论 #7518228 未加载