TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Code isn't poetry

11 pointsby tholexabout 11 years ago

4 comments

jloughryabout 11 years ago
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).
solomoneabout 11 years ago
Any syntax is less readable if you&#x27;re unfamiliar with it. If you see enough of them, it reads naturally.
otikikabout 11 years ago
I don&#x27;t agree that the second example is more readable than the first
ratsimihahabout 11 years ago
But it is!
评论 #7518228 未加载