Dart语言含有如下 63 个关键字,Go语言25个关键字,关键字个数比Go多很多,从关键字的数量方面讲,在语言语法层面的学习难度比Go要大些。
| 行号 | 关键字 | 关键字 | 关键字 | 关键字 |
|---|---|---|---|---|
| 1 | abstract |
else |
import |
show |
| 2 | as |
enum |
in |
static |
| 3 | assert |
export |
interface |
super |
| 4 | async |
extends |
is |
switch |
| 5 | await |
extension |
late |
sync |
| 6 | break |
external |
library |
this |
| 7 | case |
factory |
mixin |
throw |
| 8 | catch |
false |
new |
true |
| 9 | class |
final |
null |
try |
| 10 | const |
finally |
on |
typedef |
| 11 | continue |
for |
operator |
var |
| 12 | covariant |
Function |
part |
void |
| 13 | default |
get |
required |
while |
| 14 | deferred |
hide |
rethrow |
with |
| 15 | do |
if |
return |
yield |
| 16 | dynamic |
implements |
set |
评论