What are the most common Bigrams and Trigrams in Golang?

blov · · 450 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am designing a Programmers keyboard layout variant for Colemak, and am looking for common bigrams and trigrams for the major programming languages. For example, in Qt, my most common trigrams are probably:</p> <pre><code>(); ++) (); ++) ) { )\n{ </code></pre> <p>And the most common Bigrams are:</p> <pre><code>() ); (&#34; &#34;) (! </code></pre> <p>So from your experiences in Golang, what are your most common bigrams and trigrams when you write your code?</p> <hr/>**评论:**<br/><br/>lasizoillo: <pre><blockquote> <p>and am looking for common bigrams and trigrams for the major programming languages</p> </blockquote> <p>Most used bigrams probably are:</p> <p>^C</p> <p>^V</p></pre>AkivaAvraham: <pre><p>Har har</p></pre>exasperation: <pre><p>This is something that can be tested empirically by looking at a few existing codebases and running the numbers.</p></pre>TheMerovius: <pre><p>This. We downloaded all source code from all packages on godoc once. It&#39;s not difficult to do, doesn&#39;t take that long and doesn&#39;t need that much disk space. Afterwards you can just do the counting yourself and get a definitive answer.</p></pre>IronhandedLayman: <pre><p>It&#39;s pretty quick to write go code to scan through the codepath. Top 5 I got were (filtering out whitespace answers): [int], [ = ], [// ], [err], [ing] in most common to 5th most common order. Surprised that err wasn&#39;t on top until I thought about it. </p></pre>kkirsche: <pre><p>Not sure beyond err as most common trigram</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

450 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传