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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

NYTimes Objective–C Style Guide

80 点作者 tater将近 12 年前

9 条评论

calhoun137将近 12 年前
I hate absurdly long variable names like this:<p><pre><code> static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; </code></pre> I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.
评论 #6145473 未加载
评论 #6145691 未加载
评论 #6145483 未加载
srik将近 12 年前
&gt; Asterisks indicating pointers belong with the variable, i.e. NSString <i>text not NSString</i> text or NSString * text, except in the case of global string constants.<p>I know I have it wrong, but I always feel that the the variable is of type &quot;pointer to type&quot; so isnt it fairer to have the asterisk paired with the type denoting it is of the kind &quot;pointer to type&quot;?
评论 #6145011 未加载
评论 #6146178 未加载
评论 #6145529 未加载
评论 #6145065 未加载
评论 #6145432 未加载
评论 #6145385 未加载
评论 #6146615 未加载
评论 #6145403 未加载
hudibras将近 12 年前
Here&#x27;s their blog post about it: <a href="http://open.blogs.nytimes.com/2013/08/01/objectively-stylish/" rel="nofollow">http:&#x2F;&#x2F;open.blogs.nytimes.com&#x2F;2013&#x2F;08&#x2F;01&#x2F;objectively-stylish...</a>
评论 #6145648 未加载
adamnemecek将近 12 年前
It&#x27;s strange that NYT seems to be transitioning to a full blown tech company. Good strange though.
评论 #6147133 未加载
valtron将近 12 年前
Why do so many style guides mandate spaces for indentation?
评论 #6145535 未加载
评论 #6145693 未加载
评论 #6148619 未加载
评论 #6148754 未加载
评论 #6146667 未加载
frr149将近 12 年前
I see a lot of obsession with the irrelevant: when you&#x27;re allowed to use dot-notation, number of spaces for indentation (sic), etc... The only reasonable item, it the singleton one, the rest... what a waste of time!
评论 #6146442 未加载
stigi将近 12 年前
Has anyone ever tried to configure uncriustify [0] with a complex style guide like this and succeeded?<p>Are there other similar tools that might be a better fit?<p>[0] - <a href="http://uncrustify.sourceforge.net" rel="nofollow">http:&#x2F;&#x2F;uncrustify.sourceforge.net</a>
justincormack将近 12 年前
They seem to have an en dash between Objective and C which made me misparse the title. Surely that&#x27;s not in their style guide?
评论 #6147141 未加载
HaloZero将近 12 年前
why not provide a post-commit hook enforcing a lot these styles?
评论 #6147138 未加载