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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

EyeTracking Study: camelCase vs. under_score style (2010) [pdf]

34 点作者 entelechy超过 6 年前

4 条评论

lizmat超过 6 年前
In Perl 6, you can also use &quot;kebab-case&quot;:<p><pre><code> my $is-it-time = True; </code></pre> The hyphen is allowed inside an identifier as long as it is not the first and as long as it is followed by at least one letter.<p><pre><code> my $foo-42; # interpreted as my $foo - 42</code></pre>
评论 #18551875 未加载
pzone超过 6 年前
My current style convention mixes several naming styles to help in distinguishing code visually.<p>I prefer camelCase for variables, which need to be typed repeatedly, and camel is fastest to type. I use snake_case for functions, UpperCamelCase for classes&#x2F;types, and ALL_CAPS_SNAKE for configuration variables a user would be expected to edit.
评论 #18550553 未加载
评论 #18550622 未加载
crazyfundu超过 6 年前
For me it&#x27;s more about ease in typing. I find typing underscore so many times a bug deterrent in fast typing speed.
melling超过 6 年前
snake case...<p>I did it for years in Perl then moved to camel with Java. Now, I sort of like not having to type underscores.
评论 #18549602 未加载