* K6 ?) {9 A, l' T6 i* v1 f2 Z语言级访问数据库说的是Linq to Sql吧。那东西基本上就是个语法糖,而且微软也已经停止支持了,转而发展Entity Frameworks去了。0 k2 q0 a N' P3 Q1 q
Linq用起来还是很爽的,用类似于sql的集合操作语言,用来对付collections和xml dom之类的东西写起来真的很省力(当然效率是个问题)
回复 老兵帅客 的帖子. `- G2 G% g+ ^; {2 Z4 X X
2 q% {5 r( @0 [2 ?% q) q
在wikipedia上搜了一下reflection C++。/ X2 b' S& I Z8 O, C0 R
Qt/C++- N+ h6 d) e) ?* L h
7 H+ a m. o* F0 W+ r% }
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.
- m8 ~; V; y$ ^+ J3 x1 Z
貌似并不能直接支持,但是可以实现类似效果。$ S. e( Q( A$ E: g6 f. s c++ reflection, Y4 _5 ~$ @3 c% w9 Z' x
回复 老兵帅客 的帖子 ! `- m, b6 [5 \ D0 n( w. j2 C4 K; ]( V- A3 I
澄清一点,Linq和Linq to Sql不是同一个东西。" t- ~4 S; p/ V; b9 x
Linq是.NET引入的一种新的语言特性,是一种类似于sql的集合操作语法。Linq是个有意义的尝试,有了它对集合操作的coding效率大大提高了。Linq可以操作所有集合类型(例如System.Collections命名空间下的所有集合类),除了Linq to Sql之外,还有Linq to Xml, Linq to Dataset等等。 0 n# f, w8 N0 X - H m! h: r5 e2 j4 X3 n, {Linq to Sql是架构在Linq上的一层对数据库访问的支持。对数据库的访问还是通过API来做的。微软停止的是API的开发,Linq的语言特性是保留的。