回复 老兵帅客 的帖子: }" e% C9 x5 {. d& t- S
1 T( A; M, U' R7 V: P" \ K
在wikipedia上搜了一下reflection C++。 ! N& b, J6 D7 z; V7 i+ m, l. _; o- L9 W
Qt/C++2 o: Z9 B9 I$ I' H/ f M' S
3 i3 `0 C2 x: D" k _5 z4 u& O
Qt 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.
! f+ F& Z- a+ u. S; ]) L! i( I K貌似并不能直接支持,但是可以实现类似效果。" V: k [% }9 ?" q9 M c++ reflection& r# W9 N6 k4 P! ?
$ i( n9 s* i' |# b Q澄清一点,Linq和Linq to Sql不是同一个东西。 ; n: k/ {) I5 e: e, d" r/ cLinq是.NET引入的一种新的语言特性,是一种类似于sql的集合操作语法。Linq是个有意义的尝试,有了它对集合操作的coding效率大大提高了。Linq可以操作所有集合类型(例如System.Collections命名空间下的所有集合类),除了Linq to Sql之外,还有Linq to Xml, Linq to Dataset等等。# y6 c' J: ?& r9 p! a) a* B
1 ]- R2 U' o SLinq to Sql是架构在Linq上的一层对数据库访问的支持。对数据库的访问还是通过API来做的。微软停止的是API的开发,Linq的语言特性是保留的。