回复 老兵帅客 的帖子 6 `6 G- N% q7 v1 v3 q b Y& T- R3 u6 Q9 {7 j9 z
在wikipedia上搜了一下reflection C++。5 P f3 O9 x' r/ [" `
Qt/C++8 g3 p1 B4 \7 k: {; b& c! ~$ r% ^
8 h; h8 b, n3 `. c0 [
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.
u x) P7 h$ w/ f$ {; Z
貌似并不能直接支持,但是可以实现类似效果。+ Q" R2 K: A* h5 n3 e c++ reflection B! K* {. _" h" E2 A3 T& b% x9 [
, y; X* h8 P; p% p3 y3 T w# |澄清一点,Linq和Linq to Sql不是同一个东西。' x z& d" A& ?. J% F0 T
Linq是.NET引入的一种新的语言特性,是一种类似于sql的集合操作语法。Linq是个有意义的尝试,有了它对集合操作的coding效率大大提高了。Linq可以操作所有集合类型(例如System.Collections命名空间下的所有集合类),除了Linq to Sql之外,还有Linq to Xml, Linq to Dataset等等。 % X+ k Q1 h: d9 g 2 l7 t$ W( t% C6 ?1 o yLinq to Sql是架构在Linq上的一层对数据库访问的支持。对数据库的访问还是通过API来做的。微软停止的是API的开发,Linq的语言特性是保留的。