-
Notifications
You must be signed in to change notification settings - Fork 31
/
README.txt
239 lines (203 loc) · 11.9 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# Keywords
A list and count of keywords in programming languages.
┌───────────────────────────────────────────────────────────────────────────────────────────┐
│ ...... │
│ ...... │
│ ...... ...... │
│ ...... ...... │
│ ...... ...... ...... │
│ ...... ...... ...... │
│ ...... ...... ...... │
│ ...... ...... ...... │
│ ...... ...... ...... │
│ ...... ...... ...... ...... ...... │
│ ...... ...... ...... ...... ...... ...... ...... │
│ ...... ...... ...... ...... ...... ...... ...... │
│ ...... ...... ...... ...... ...... ...... ...... ...... ...... │
│ ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... │
│...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... │
│...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... │
│..22.. ..25.. ..26.. ..32.. ..35.. ..36.. ..49.. ..51.. ..52.. ..54.. ..89.. .100.. .109.. │
│Lua Go Erlang C Python Ruby JS Java Rust Dart Swift C# C++ │
└───────────────────────────────────────────────────────────────────────────────────────────┘
## Why does it matter?
The number of keywords in a programming language _can_ be an indication to it's simplicity/complexity, and that can impact the simplicity/complexity of the solutions that developers produce using it. Complex solutions can be more expensive to maintain and difficult to hire for. However, this is dependent on many factors and keyword count is only one; language idioms also play a massive part.
## Contribute
Don't see a language here? Please open a pull request adding it!
## Similar Work
* https://github.com/e3b0c442/keywords - An expanded version of this list, including a large collection of languages and formal references.
## Keyword List
### Lua (22 keywords)
and break do else elseif
end false for function goto
if in local nil not
or repeat return then true
until while
### Golang (25 keywords)
break default func interface select
case defer go map struct
chan else goto package switch
const fallthrough if range type
continue for import return var
### Erlang (26 keywords)
after and andalso begin bnot
bor bsl bsr bxor case
catch cond div end fun
if let not of or
orelse receive rem try when
xor
### C (32 keywords)
auto double int struct break
else long switch case enum
register typedef char extern return
union const float short unsigned
continue for signed void default
goto sizeof volatile do if
static while
### Python (35 keywords)
False await else import pass
None break except in raise
True class finally is return
and continue for lambda try
as def from nonlocal while
assert del global not with
async elif if or yield
### Ruby (36 keywords)
alias and begin break case
class def defined? do else
elsif end ensure false for
if in module next nil
not or redo rescue retry
return self super then true
undef unless until when while
yield
### JavaScript (49 keywords)
arguments await break case catch
class const continue debugger default
delete do else enum eval
export extends false finally for
from function if implements import
in instanceof interface let new
null package private protected public
return static super switch this
throw true try typeof var
void while with yield
### Java (51 keywords)
abstract continue for new switch
assert default goto package synchronized
boolean do if private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while
_ (underscore)
### Rust (52 keywords)
abstract alignof as become box
break const continue crate do
else enum extern false final
fn for if impl in
let loop macro match mod
move mut offsetof override priv
proc pub pure ref return
Self self sizeof static struct
super trait true type typeof
unsafe unsized use virtual where
while yield
### Dart (54 keywords)
abstract as assert async await
break case catch class const
continue covariant default deferred do
dynamic else enum export extends
external factory false final finally
for get if implements import
in is library new null
operator part rethrow return set
static super switch sync this
throw true try typedef var
void while with yield
### Swift (89 keywords)
associatedtype class deinit enum
extension func import init
inout internal let operator
private protocol public static
struct subscript typealias var
break case continue default
defer do else fallthrough
for guard if in
repeat return switch where
while as catch dynamicType
false is nil rethrows
super self Self throw
throws true try #column
#file #function #line #available
#column #else#elseif #endif #file
#function #if #line #selector
associativity convenience dynamic didSet
final get infix indirect
lazy left mutating none
nonmutating optional override postfix
precedence prefix Protocol required
right set Type unowned
weak willSet
### C# (100 keywords)
abstract add alias as ascending
async await base bool break
byte case catch char checked
class const continue decimal default
delegate descending do double dynamic
else enum event explicit extern
false finally fixed float for
foreach from get global goto
group if implicit in int
interface internal into is join
let lock long namespace new
null object operator orderby out
override params partial private protected
public readonly ref remove return
sbyte sealed select set short
sizeof stackalloc static string struct
switch this throw true try
typeof uint ulong unchecked unsafe
ushort using value var virtual
void volatile where while yield
### C++ (109 keywords)
#define #defined #elif
#else #endif #error
#if #ifdef #ifndef
#include #line #pragma
#undef alignas alignof
and and_eq asm
atomic_cancel atomic_commit atomic_noexcept
auto bitand bitor
bool break case
catch char char16_t
char32_t class compl
concept const constexpr
const_cast continue decltype
default delete do
double dynamic_cast else
enum explicit export
extern false final
float for friend
goto if inline
int import long
module mutable namespace
new noexcept not
not_eq nullptr operator
or or_eq override
private protected public
register reinterpret_cast requires
return short signed
sizeof static static_assert
static_cast struct switch
synchronized template this
thread_local throw transaction_safe
transaction_safe_dynamic true try
typedef typeid typename
union unsigned using
virtual void volatile
wchar_t while xor
xor_eq