回复 明月回春 的帖子 / O+ b$ w1 d. N$ E 1 C" q& ]! L! ]6 v6 T嘿嘿,探讨一下哈。( p3 t& ?3 @. U7 ^0 o$ y
, u3 i/ N4 k p* ?/ c+ q其实Java和C#的设计理念相当不同,早先的后者只是前者的微软抄袭版本,但是后来则完全不同了,微软加进去了很多很奇怪的特性,例如在语言级别提供数据访问能力,而该类功能传统上是由类库或者函数库来提供的。也就是说,微软的设计理念出了问题,它违反了语言的基本设施应该尽可能简练,而附加的功能通过类库或者函数库来提供这一原则。( l' _4 F, @; x
Qt/C++ 5 y$ h- h* h# o : r) N' W# }8 c3 BQt 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.
4 d% p: E9 F9 m. [) [; n
貌似并不能直接支持,但是可以实现类似效果。 6 p$ a' Q" E- J6 r# z+ C. x8 d7 tc++ reflection" I) w1 m$ I) M- |4 W5 N