一.switch 支持string了,挺好。; l; m, d1 i, F+ u. E% Y. c
二.多个异常同时处理,不太明白。 * g2 w2 R, C n1 l ]# |' y是下面形式?- S3 V2 a+ c' j: T" Q, ~- a
try {* ], j& Y3 z7 V5 C& q! h$ R
... ' q1 u2 D9 t# K) x! o}& U2 A2 n/ d! y. U2 Z7 t# ?
catch (XxxxException A, YyyyException B, ZzzzException C) { , C' v9 i: M- t: I..../ H$ g1 _+ L5 C/ ~8 Z P4 c
}% H3 J& v% c* H: V; H
9 u1 v Z: M7 l, p
第三个同感,可有可无。。。
Qt/C++ - `" }, m: W& K! U 1 v7 }. N: o# Q. d+ AQt framework extends C++ with its meta-language and provides reflection ability of member/method reference and query by name for Qt objects with QMetaObject class, which contains meta-information about the Qt objects.
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
3 }- e' x x6 o# y貌似并不能直接支持,但是可以实现类似效果。: x& k& _" d! L& L: ^. y+ T c++ reflection ( f% p. e( G1 Y I5 |