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.

NYTimes Objective–C Style Guide

80 pointsby tateralmost 12 years ago

9 comments

calhoun137almost 12 years ago
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 未加载
srikalmost 12 years ago
&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 未加载
hudibrasalmost 12 years ago
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 未加载
adamnemecekalmost 12 years ago
It&#x27;s strange that NYT seems to be transitioning to a full blown tech company. Good strange though.
评论 #6147133 未加载
valtronalmost 12 years ago
Why do so many style guides mandate spaces for indentation?
评论 #6145535 未加载
评论 #6145693 未加载
评论 #6148619 未加载
评论 #6148754 未加载
评论 #6146667 未加载
frr149almost 12 years ago
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 未加载
stigialmost 12 years ago
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>
justincormackalmost 12 years ago
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 未加载
HaloZeroalmost 12 years ago
why not provide a post-commit hook enforcing a lot these styles?
评论 #6147138 未加载