SlideShare a Scribd company logo
1 of 24
今夜発表
C#で最も使われていな
い言語機能はこれだ!
不真面目版
調査対象リポジトリ
• GitHub の公開リポジトリで、主な言語が C# のもの
• ★の数が多い順に 100 個
• デフォルトブランチ
リポジトリ Top 10
1. dotnet/corefx ★10,505
2. dotnet/coreclr ★6,892
3. dotnet/roslyn ★6,195
4. SignalR/SignalR ★5,968
5. thedillonb/CodeHub ★5,422
6. PowerShell/PowerShell ★5,038
7. StackExchange/dapper-dot-net ★4,977
8. mono/mono ★4,881
9. shadowsocks/shadowsocks-windows ★4,792
10. NancyFx/Nancy ★4,414
調査方法
• git clone して C# ソースコードを Roslyn でパース
• 使われているキーワードの個数を数えた
今夜発表
C#で最も使われていな
いキーワードはこれだ!
ちなみに
• Roslyn で定義されている全キーワードは 114 個
• 予約語 81個
• コンテキスト キーワード 33個
• #region などの # ワードは含まず
ちなみに
• Roslyn 的にはキーワードではない皆さん
• var
• dynamic
• nameof
• SyntaxToken.IsKeyword()
• NameOfKeyword はある
全部で
• リポジトリ数:100
• 総ファイルサイズ:17.6GB
• C# ソースコード数:143,575 ファイル
• 行数:28,761,690 行
• 全キーワード数:15,981,958 個
~第21位
21. implicit
22. volatile
23. checked
24. sizeof
25. remove
26. add
27. do
28. select
29. from
30. goto
31. param
32. unchecked
33. operator
34. params
35. event
36. lock
37. delegate
38. extern
39. enum
40. struct
41. ushort
42. unsafe
43. finally
44. fixed
45. interface
46. module
47. ulong
48. where
49. partial
50. switch
51. continue
52. sealed
53. sbyte
54. while
55. yield
56. abstract
57. async
58. decimal
59. short
60. char
61. assembly
62. global
63. await
64. default
65. as
66. uint
67. catch
68. virtual
69. try
70. ref
71. foreach
72. base
73. in
74. break
75. float
76. for
77. readonly
78. out
79. long
80. protected
81. const
82. is
83. byte
84. namespace
85. double
86. set
87. typeof
88. throw
89. case
90. override
91. else
92. object
93. internal
94. class
95. get
96. true
97. private
98. bool
99. static
100. false
101. void
102. this
103. null
104. using
105. string
106. int
107. if
108. return
109. new
110. public
第16位~第20位
16.into
17.when
18.let
19.stackalloc
20.explicit
第11位~第15位
11.__makeref
12.__arglist
13.join / on / equals
14.group / by
15.orderby
http://ufcpp.net/study/csharp/sp_makeref.html
第10位 - _refvalue (127回)
• Undocumented
第9位 – alias (105回)
• extern alias という文脈で使用する
• http://ufcpp.net/study/csharp/sp_namespace.html#exter
n
第8位 – descending (81回)
• LINQ の orderby で使用する
第7位 – method (49回)
• 属性の指定時に [method: Hoge] として使用する
第6位 - __reftype (28回)
• Undocumented
番外編:使用頻度上位のキーワード Top5
1. public:1,512,234回 (9.46%)
2. new:1,206,266回 (7.55%)
3. return:1,054,937回 (6.60%)
4. if:990,508回 (6.20%)
5. int:901,331回 (5.64%)
• Top 10 で 56%
第5位 – ascending (26回)
• LINQ の orderby で使用する
第4位 – field (23回)
• 属性の指定時に [field: Hoge] として使用する
第3位 – type (9回)
• 属性の指定時に [type: Hoge] として使用する
第2位 – property (3回)
• 属性の指定時に [property: Hoge] として使用する
第1位 – typevar (2回)
• 属性の指定時に [typevar: Hoge] として使用する
• ジェネリックの型引数に属性を適用する
属性の対象指定子
• assembly
• module
• field
• event
• method
• param – プロパティの set アクセッサーやイベントの add / remove アクセッサーの value 引数
• property
• return – メソッドやプロパティの戻り値
• type
• typevar
まとめ
• 上位は隠し機能と属性関連のキーワードが占めている。
• 属性関連のキーワードの大半は明示的に書く必要がない。
• 知らなかったキーワード
• 隠し機能関連
• typevar
• alias

More Related Content

Similar to C#で最も使われていない言語機能はこれだ!

Weeklycms20120218
Weeklycms20120218Weeklycms20120218
Weeklycms20120218Yoshi Sakai
 
シェル芸初心者によるシェル芸入門 (修正版)
シェル芸初心者によるシェル芸入門 (修正版)シェル芸初心者によるシェル芸入門 (修正版)
シェル芸初心者によるシェル芸入門 (修正版)icchy
 
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)inaz2
 
voldemortの技術 - Dynamoとの比較
voldemortの技術 - Dynamoとの比較voldemortの技術 - Dynamoとの比較
voldemortの技術 - Dynamoとの比較Joongjin Bae
 
Php in ruby
Php in rubyPhp in ruby
Php in rubydo_aki
 
シェル芸初心者によるシェル芸入門
シェル芸初心者によるシェル芸入門シェル芸初心者によるシェル芸入門
シェル芸初心者によるシェル芸入門icchy
 
Cookpad 17 day Tech internship 2017 言語処理系入門 Rubyをコンパイルしよう
Cookpad 17 day Tech internship 2017 言語処理系入門 RubyをコンパイルしようCookpad 17 day Tech internship 2017 言語処理系入門 Rubyをコンパイルしよう
Cookpad 17 day Tech internship 2017 言語処理系入門 RubyをコンパイルしようKoichi Sasada
 
Kink: invokedynamic on a prototype-based language
Kink: invokedynamic on a prototype-based languageKink: invokedynamic on a prototype-based language
Kink: invokedynamic on a prototype-based languageTaku Miyakawa
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)Yoshifumi Yamaguchi
 

Similar to C#で最も使われていない言語機能はこれだ! (11)

Weeklycms20120218
Weeklycms20120218Weeklycms20120218
Weeklycms20120218
 
シェル芸初心者によるシェル芸入門 (修正版)
シェル芸初心者によるシェル芸入門 (修正版)シェル芸初心者によるシェル芸入門 (修正版)
シェル芸初心者によるシェル芸入門 (修正版)
 
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)
ROP Illmatic: Exploring Universal ROP on glibc x86-64 (ja)
 
voldemortの技術 - Dynamoとの比較
voldemortの技術 - Dynamoとの比較voldemortの技術 - Dynamoとの比較
voldemortの技術 - Dynamoとの比較
 
Php in ruby
Php in rubyPhp in ruby
Php in ruby
 
シェル芸初心者によるシェル芸入門
シェル芸初心者によるシェル芸入門シェル芸初心者によるシェル芸入門
シェル芸初心者によるシェル芸入門
 
Cookpad 17 day Tech internship 2017 言語処理系入門 Rubyをコンパイルしよう
Cookpad 17 day Tech internship 2017 言語処理系入門 RubyをコンパイルしようCookpad 17 day Tech internship 2017 言語処理系入門 Rubyをコンパイルしよう
Cookpad 17 day Tech internship 2017 言語処理系入門 Rubyをコンパイルしよう
 
about Perl5.10
about Perl5.10about Perl5.10
about Perl5.10
 
Kink: invokedynamic on a prototype-based language
Kink: invokedynamic on a prototype-based languageKink: invokedynamic on a prototype-based language
Kink: invokedynamic on a prototype-based language
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)
 
C#勉強会
C#勉強会C#勉強会
C#勉強会
 

Recently uploaded

【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案sugiuralab
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 

Recently uploaded (8)

【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 

C#で最も使われていない言語機能はこれだ!