3 u$ j; F" `) H% E 再来看看它们的前景吧。实际上,技术的进步在很多时候是此消彼长的。当初Bo `. f4 z* K, m) F0 irland的Turbo C和Borland C++几乎是唯一的选择。微软的Quick C(现在还有人知道这个 " u* C7 c9 ^& s4 \5 B& y
产品吗?)和Microsoft C/C++从来也没有成为过主流。但Borland C++又流行了多少年呢 + L& G W: B! I' j) r
?不久就被新崛起的Microsoft Visual C/C++压下去了。现在的C++Builder又有后来居 ; ?. T+ @9 _ m% Y! f+ O2 C上的态势,如果稳定性再提高一些,bug再少一些,有希望成为主流。但Inprise的总体 # }" ^& X8 Y$ l3 a0 ?; H" t
实力不及微软,这也是无可争议的。从C++Builder 5的Release Notes中的Known Issue & ]9 B ~5 u. P) N$ K1 B
s部分,以及它们的帮助文档的规模和质量都可以看出。(哪个同类产品的帮助文档能和 + f- g5 w+ h3 u- w2 ^. pMSDN比呢?)Inprise公司应从Netscape吸取教训,不要让C++Builder成为第二个Netsca 3 ?1 a: Y- B6 C+ c% D1 y4 q; L
pe Communicator。(Communicator也是一度技术领先,甚至曾占据了大部分的浏览器市 3 L' O' f/ N7 N场,但似乎后劲不足,而且 6.0 PR1、2中bug多多,现在被IE压得抬不起头。)C++Buil $ G, z& _" I3 }+ ?
der是Inprise的旗舰产品之一,前景应当还是比较乐观的,而且Inprise已经在向Linux , y/ ~5 O& r3 _5 t/ {3 b& m
进军了,而微软还迟迟没有动作,难道非要到Linux成燎原之势(或许已经成燎原之势了 * N8 m e' C3 `( a
)才会奋起占领这个新兴市场?似乎他们对Linux的态度与几年前对互联网的兴起的反应 : S$ y5 O0 ^2 N" X! ^! ?8 M' @迟缓有些相似。但后来......唉,真希望Inprise不要步Netscape的后尘。C++Builder是 ) Q& ]- c1 M$ G9 F) y7 ~一个很有前途的开发工具。遗憾的是,Inprise公司Delphi的创始人已经跳槽到微软去主 9 C/ Y4 p0 i: h: d4 w. u7 H
持Visual J++项目了。但愿对Inprise冲击不会太大。微软的Visual C++的前景又怎样呢 0 s! o2 [: q8 S
?Visual Studio 7.0不久就要推出了。不知能不能在保持稳定性的同时在技术的先进性 4 N6 z5 h" h) r4 D% e1 w% S7 L
上赶上C++Builder。另外,这一版本将加强网络开发的特性。看来微软虽然被判解体, " Q4 z- \/ o! X; y开发实力可是一点没打折扣。 @7 ?5 [+ p! O; l
4 \4 c2 Q7 g8 w' e3 I9 y/ D
, |( H7 ` C% U7 W, w
就技术(主要指应用框架)来说,C++Builder目前领先于Visual C++。但多多少少 % A2 s1 j* o* a' @& x& k0 ?( \
的不尽人意之处让我对Inprise“想说爱你不容易”。而VC尽管发展到今日已十分完善, 7 y3 U9 ?* g9 Y! y* e
但MFC框架已是明日黄花了。如果不使用MFC,目前又没有合适的替代品。WFC是支持组件 - z% @8 k! K: ]. j* g; I4 u、属性和事件的,但那是Visual J++里边用的;ATL也很先进,但是用来进行COM/Activ * u2 C3 m& Q9 l' o$ Y b: SeX开发的;基于ATL的WTL也不错,可惜是非官方作品,也未必比VCL先进。微软最近提出 . r, \! z% D9 ]5 ]& }2 i
了C#(读作C Sharp)语言方案,但那属于和Java同一类的东西。看来是金无足赤啊。根据 % n K8 e5 c6 _你的需要做选择吧。实际上Visual C++和C++Builder也不是单单竞争关系。它们在许多 5 Y) X. f& ~6 D+ r+ y. \
领域并不重叠,甚至是互补的。到底怎样取舍,要根据你的项目特性决定。如果你开发 . S& Q/ s! M/ \* v) f
系统底层的东西,需要极好的兼容性和稳定性,选Visual C++吧。你可以只调用Window |0 m. u, j) o. as的各种API,不用MFC。如果你写传统的Windows桌面应用程序,Visual C++的MFC框架是 / J2 d- D2 D! K5 V# j+ |& S6 p
“正统”的选择。如果你为企业开发数据库、信息管理系统等高层应用(“高层”是相对 * v" g' C/ X, Z于“低层/底层”而言的,不是说技术高级或低级。)而且有比较紧的期限限制,选C++B " L6 T% k/ J& b% l s% Z/ G$ nuilder比较好。如果你用的语言是Object Pascal,Delphi是唯一的选择(如果GNU Pasc ' T, N8 ^7 \6 Z7 R6 c& [
al等免费编译器不考虑的话)。如果你原先用Delphi(Object Pascal语言),现在想改学 9 c* Z7 O! |4 g5 l: eC++,应当先用C++Builder。熟悉的界面和相同的框架会让你的转轨事半功倍。 ( m' D/ q" C& s, z4 s; g/ u
5 }3 E: s1 r2 V r( t& k N1 D$ ~0 k& K5 I! A% T
另外,虽说MFC已显落后,但不是说它不值得学。事实上,不学MFC就等于没学VC 6 H" G% i7 l# D" [% |) b
。利用MFC框架开发程序仍然是目前开发桌面应用的主流模式,而且还会保持相当长的时 ) f. h% E1 K3 n/ g
间。即使你不使用MFC框架,花点时间学习一下MFC的封装机制对你熟悉C++的OOP机制和 0 N" s4 [7 Y* z8 iWindows底层功能也是很有好处的。 % i `+ j7 F( Z. W6 b- y, q ( t6 c e( H1 I1 K 1 o m3 w7 }. e2 ]# `) w 以上意见仅供参考。 / W$ @" V( @, I( x7 E& Q
" Y# w P0 n$ g: r1 G M 6 z$ T; o' t8 r + d% {. W3 e/ V" U5 `5 E5 ]0 _ 如果有什么看法,请大家在在线讨论中进行讨论。 3 @' _- v1 n, d% a1 [: @
4 K, B; t3 V7 a' s8 J I 2 [9 Q k9 [) A6 B$ y3 i
) K! S) Z. O& T) ^- l- _2 N 恶魔吹着笛子来 来自 苍天已死,黄天当立--c/c++的时代正在淡去 : 4 o" ?( S/ @/ U; ~1 g% W0 w+ x
: E' y3 y, q* F0 G3 o( c+ H 不要以为这个题目是耸人听闻,但就目前的形势来看c/c++是需要退出舞台或者说的婉 & C$ a, W9 G8 v% e, W1 n# n( S
转一点是需要更新换代了. / z F8 ?9 e) H# G1 Y " i% U4 t' O+ z3 l
我想在未来的一两年里,作为程序员等级评判的标准之一c/c++(不管是mfc还是bcb)将 1 V# O8 K% p4 J- D! q5 n0 _$ s. n
会让位给三种编程语言,1.sun的java2.windows平台上的c#3.xml # a0 y3 C* C4 R! n
}. Q, _' u2 T% n" Q5 L7 p
为什么这么说呢,我认为最大理由是目前的应用程序正在从基于独立的操作系统,传向 # V0 ^1 e; h! D0 x3 y/ x' B, T
基于internet平台. " u0 T- i1 F/ U# |! a2 o+ E, a v/ |& Y8 a" s3 Q
我们以前开发应用程序都是依赖于平台的功能调用,mfc,bcb都是这样.而现在日益火热 ( x# x) A4 C+ [$ t- m的internet编程却最不想关心的就是某一个平台的调用,譬如说要实现b2b的电子商务那 ( W# A" m3 t2 g$ O2 |
么就需要做不同平台的集成,如果我是程序员我最care的就是如何实现商务逻辑 " E7 C% P" ?5 G8 d. h( R7 u; b4 y4 X& _
4 l( B# M: e" w/ k0 n 而不是各种平台之间的通信和管理.那么我们最迫切需要的就是一种与各种平台调用无 : ?- d% w0 V5 V, V关的语言,这中语言只注重程序逻辑的设计而不涉及平台的调用.而我们熟悉的c/c++却恰 9 D+ p7 J$ c" W7 ^恰不是为这个而设计的(赫赫这也不能怪c/c++在70年代谁能知道现在internet的情况呢 6 q+ K6 @% s( A1 V/ h).c/c++的最初设计目的是为了设计unix产生一种介于汇编和高级语言之间的一种开发高 4 r6 s! @: }, C$ ]0 c q. G) _
效而性能不低的语言.他要比其他任何高级语言都要关心系统的物理结构,譬如一直是毁 " c, H* T7 }7 K. m9 b/ v7 J2 s誉搀半的指针.指针之所以强大就是应为涉及了系统物理内存的管理.他可以使得程序员 : m; a: V' g3 b7 J
和系统之间成为一种半透明状态.但是就是这种半透明的状态让指针带来了更多的不稳定 1 b) [ [; D- l; X( o" a7 @性. ! ^. C0 a- r$ k% b) H ( h* A, O4 I Y; R: y0 |
c/c++在面向Internet的编程中却无任何优势可言.跨平台的电子商务软件最害怕顾及 6 F* w0 y7 b' {' x; X; I各种平台之间的天差地别的系统调用,最害怕时不时的由于内存泄漏而crash.c/c++的优 ! [' O# [, d9 P9 ^% ?势在这里却成为了劣势.即使在windows平台上开发基于windows dna的solution 4 o! `# x+ j* \' ^ ]8 A& W! X7 \5 f0 {( ~
用的最多的还是vb做的dcom而不是vc的atl做的dcom,因为c/c++虽然高效但是太容易 0 Z5 A: W6 c( y- `% a. f8 K
& P _2 U/ g. K4 c# e
出错,如果不是很小心的释放内存nt很快就会资源不足. 5 U( s2 k# ^' z. O 2 v, N8 q X0 W H! {; u: c* k3 d java就是最先看到这种情况,他用jvm实现了平台无关用内存回收实现了稳定健壮.但是 9 | K C& ^* c6 A: F( @1 w
相当多的c/c++程序员抱怨java太慢了.的确即使到java2速度仍然是一个大问题.我曾经 9 q% V8 O" V2 q$ B3 c4 V是一个c/c++坚决拥护者在许多论坛里和java程序员打笔仗.但是我逐渐意识到面对与in T( ] x$ n( F
ternet平台而不是特定的操作系统的时候java的速度问题往往是一个小小的瑕疵.我们可 $ t' N+ p* c7 ^' X/ L
以想象那一个电子商务网站会用我们手头的pc做服务器,他们不是sun的e1000就是ibm的 4 A3 L3 g" \# X# Krisc6000.在这种平台上java这点速度问题只是a peice of cake.程序员只需要专注与商 9 D3 H6 z8 k% V" |) j( w- B8 E4 d' s
务逻辑的编程,而不必要关心数组是否越界,对象内存是否释放更不需要关心是不是unix , B& ^+ y' f! _4 \. u1 V! j P# v和windows的系统调用不一样. ' c" [- r5 k: n2 S1 D$ {& I4 W - K6 B3 O1 r- ?8 c2 v% H
微软的c#可以说是一种java与c/c++的杂合体,他可以回收内存,可以平台无关.但是 4 x' _2 x# e \ 2 T) E& G0 k# a$ y8 V% S 他又可以实现一些java没有的功能譬如在标记的程序段内用指针自己管理内存,可以实 Y# ^& @( J O$ b( x, U! w现操作符的重载等等.为什么要这样做我想也许c#还肩负了一定的面向操作系统开发的任 Y _5 t0 Z0 ?0 I6 C$ P: Q1 f务例如winform.他基本上的思想和java类似,但是实现的方法又不一样他不通过jvm解释 . w' r, m8 K3 v; {1 h8 t
中间代码,而是吧源代码编译成p代码然后通过CLS库和JIT在平台上及时编译为100%的本 1 {" z5 H; t! J( E P
地代码来执行.他的pe代码是独立于平台的,但是cls和jit却根据不同的平台而设计.因此 ! X7 z, |1 C' p8 d
c#的平台独立有点类似于c/c++在不同平台上的移植使得c#比java来的更快.而且微软还 * L4 F( V4 k/ P+ }5 ~3 }许诺cls和jit不仅针对c#还可以针对任何语言譬如pascal,smaltalk,basic因此将来有可 . e3 l r0 P! |2 q1 @
能所有的编程语言都是可以平台无关的(ms真是毒,所有的语言都平台无关java还有什么 5 s J; ~1 f6 j7 z5 z: ^优势呢,据说ms正在开发基于pascal smaltalk的asp+). ( b9 N" f# p2 Y( R% o2 Z
: l! T+ ^1 m- S. L xml很多人可能认为与html相类似的语言和c/c++,java,c#完全不在一个档次上的语言 ( y9 b' v% U4 A2 P1 f: e
.其实不然.我们知道不管是c#还是java都是通过统一地层计算来实现平台无关.那就必须 6 L* e* T8 H$ B9 w( r$ w9 Z在性能上付出一点代价.而xml却能够实现不同的语言之间的调用.譬如说一个网占用jav 1 A* X0 Y( V( c- m; P/ k4 g: @+ t
a用bean实现一个出货功能,另一个网站用dcom实现一个入库功能 .如果这个网站需要实 . ^6 `* v9 Q: C1 i: t7 `* `3 \ H
现b2b,用一般的方式就是在他们之间写转换程序.而xml通过标记语言来描述各自的借口 , q7 s i" d% d# G0 z3 q" O) B
特性.两端通过解析xml文本来实现互相的调用,无需任何中间转换程序 ; D9 H) Z2 K# H
% G2 Q- f6 s v+ R6 \! h$ N 只要一张xml文本就能实现bean和dcom之间的通讯(要说清楚其中的机理,需要很多xml 3 b4 X. W7 @" o* L* X概念如果有兴趣可以到msdn.microsoft.com/xml或者<a href="http://www.s3c.org" target="_blank" >www.s3c.org</A>去看看).目前ms的.ne # M4 e- j+ s0 Ft中最核心的技术soap就是完全基于xml的远过程调用. $ T3 Q, H& K! B, W" @
' \ Y! e) r1 ^6 S. e 介绍了那么多可能有点跑题,其实我最想说的就是21世纪的程序员应该从面向操作系统 ( E) U* _% \3 J. S% e' X6 A
的传统方法中走出来,学习一点如何面向Internet平台编程的技术和概念.不要在无畏的 0 ?: ?$ j0 p+ X, m
那种c/c++工具好之类的地方争论.我想不出一两年不管是bcb还是mfc都要淘汰, ) Z& m: d8 z/ W
8 O; B' ~' t- D1 r
到那个时候要争论的不是bcb好还是mfc好而是c#好还是java好.至于xml那是不管sun和 ! B4 Y2 L: S" G3 R9 W i# e. s) tms以至于世界任何大的IT公司包括Intel,hp都在奋力研究的技术,不学习可能就要被淘汰 4 s9 k$ t$ G @* u.至于c/c++可能就会沦落到现在汇编的地位在某些系统效能敏感的地方还能见得到. 3 z! u) U+ t: t
4 ~6 T3 I1 K: b {; e& e+ Y
如果是编程语言的初学者那么我建议学习java同时关注c#,他们首先比c/c++简单没有 ( H2 l1 b5 B% H7 z3 j+ H7 b5 `) w复杂的宏,指针,摸版等等让人摸不招头脑的概念.而且是完全面向对象,比c/c++的半调子 8 q- @( L% T0 M& L0 l面向对象清楚的多好学的多.(我推荐目前学习java,毕竟c#还没有发布而且刚发布的bet $ [: a, z! m3 l5 }a版的编译器要求高的吓人需要win2000 adv server没有128M内存的别想跑.话说回来c# : ]2 x2 P f, y. V [' E5 u- g& P和java一摸一样没有什么太大的区别学好了java将来的c#将会信手拈来) 2 a& \$ ]1 @/ C9 J- J- i
$ I* q- z/ k2 H5 Y, k 对于目前的windows下的编程者来说学习mfc的价值还是有一点的但是不是太大.至少可 ) m: L" s- @& x' q
以熟悉windows内在机理.但是我还是推荐关注一下c#将来的windows.net都是基于c#而不 8 }- L3 K. `% w( s% {, C, b
是mfc.而且c#要比mfc简单的多实现一个同样的windows桌面应用c#的开发速度是mfc的两 * g: q) T5 G- }" ^到三倍而且几乎看不见性能的损失. visual studio 7.0中 vc将是一个次要的开发工具 ) P) y* h/ D% u E最主要的开发工具就是c#和vb7.0.至于borland我想是不可能不跟着ms走至少windows平 % E9 g: w5 F# b# T! i% }台上是这样说不定明年就有一个c# builder出来作为borland的主打产品而不是c++buil 1 g+ ~' J" j9 x3 e) R$ `
der了.说一句玩笑话wenny说不定很快会把这里变成<a href="http://www.c#help.net" target="_blank" >www.c#help.net</A>了 7 D o' S( z" U0 H, ~9 E [7 U4 h" F5 L: ~$ g ( q. v1 i# s; Q4 c
0 J) }% @. A! W3 o
0 H9 R4 R6 P6 {, Y" p. q ( d$ k; L' Y& _" |8 l+ |! C zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 8 [3 X, ^ i; h ( q$ d" \5 s ]. ^6 L) m
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft 1 z4 F6 s9 ?' e
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 . G- o# g' D. e& L0 F5 S/ ~
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 2 ^, ` T# p) w6 w. U1 K' ?序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 * I% D! d9 ?7 `方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 . M: Q' I0 b: A- u9 [% P$ `一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 - a: z% I1 j1 @0 h5 B5 ]1 i活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 ( z" N! Z- k# u! U0 h7 q
们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 5 e* p' y* A: X4 C. Z0 I } l
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 . {6 M& [1 N9 i9 d* d5 k) \% ?多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 + L6 |1 I* I4 T# Z# m. d; w& Z
其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 + M* @9 h( F& T( j
中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 1 }4 T, v! E: g: i可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 5 s- k, l& t* K# E1 C
表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 % K) M* s/ n3 v" @
" C0 D/ `1 T2 I' R. @
zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 5 K# n) D+ j9 `& D0 b' X/ y! {4 m
2 n0 T/ O1 _1 J3 M) z
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft ) z/ ^) P; r6 N: K7 W; j在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 - B' ~4 W1 _& f
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 # }8 s V9 K- t4 s5 F1 a
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 8 y( i% s" {+ d2 a方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 " x' [* H5 _9 G% ^" K7 ^2 z1 ]) a" `
一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 2 {. s0 A& A, d4 F) l活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 , r3 |0 ]7 I- L+ c) ?3 ?
们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 . U T$ t2 h) g4 U" M6 ?6 _' M! C
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 , Y" ~6 m; D- e; Z
多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 7 n; ]- W2 ~0 J/ M" Z+ W/ D! A( O. ]其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 ; N( _# W0 z7 e# ^% W' m中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 % W* v! ~) i5 _ T) w& u1 \
可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 ' g# o- o6 u& H2 K0 ~; N5 U
表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 . S) [" k0 S. [9 K" e6 H / Z4 f: W, _- ` ^0 B zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 9 E$ b, l: P W0 h ; h$ r4 E# H7 W5 i m7 _ 其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft , t0 j+ n6 {/ G& Y5 N
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 - B& u9 Z$ E' l: y! [7 D+ X
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 p+ q1 o9 q+ @- W/ m6 _# C# T
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 . ^: A$ Y$ [5 n. `: W9 G& b+ f/ z方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 ; H/ Q6 |! K' [/ ]* S, g
一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 . f5 w' a; s( R$ u; C( A& H
活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 * H/ L2 U1 X. m) b们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 % D/ u4 t3 E, i1 ^8 `5 e
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 - J$ ?: y3 J2 z; F8 P, L多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 6 G7 h3 S: f5 m0 E: u
其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 % V3 h$ O9 V! @, y! ?中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 , V+ e1 p5 K- e! v$ b! n0 E
可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 / I/ L. M1 h* o. \; F! ?. N Q表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 / H) H: x9 m$ K9 S# D4 D: \ a5 Z K# f8 o! j
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : $ C, Z3 e/ x8 b" J& E! p5 w 0 }, n+ ?2 ^9 c 我一定程度上同意 恶魔吹着笛子来 的说法, ) D3 T3 O4 y" l+ Y( f6 S ]
. v6 o# u' }4 ]% W0 P/ \5 l7 S 毕竟VC开发速度是比较慢的, 1 g5 t. K* w" R s5 D1 {2 r" G3 w 3 X/ V4 I9 _& z- z5 T 而且硬件速度的大规模提升也为使用JAVA开辟了道路, 9 ?" t% N R( {: x M4 s 5 r/ [6 k s! K5 L* V 不过microsoft.net的目的是一定程度上改变MS的经营性质,和开发关系不是很大,但 ( }' v3 G1 Z- n" a( Z% N' ]是MS的一贯方针都是在平台上为开发人员提供方便, 3 V# k* H3 `* c5 z
& U, F+ B( e( ^
所以C#是为了.net服务的。 + Y2 w8 h: {) E , A1 _6 h" G8 a6 y2 M! G
# \/ u) \- d/ D/ Z
此外我想我没有精力再搞个c#help.net了。:-P 4 w' l X0 q* r6 _ * m4 T5 ^6 H- W 果子 来自 http:// : ( G5 F; R) m" Y2 R$ p% f% T' K
8 i* T# m& \. ]/ r' S6 P; y "恶魔吹着笛子来"是比较“前卫”的一类程序员。我就听业界的人多次说过JAVA也是 e# y5 Z# u6 ~- X2 e/ X 6 V- d, ?3 q5 N7 { 5 N+ N+ @, V/ z4 r4 P$ l 个吹得很响的东西,但实际如何,大家都看得见。至于认为C/C++开发工具(VC, ( c% c" |$ t3 ?4 W # W- X/ y/ o1 }6 V8 \7 H BCB等)会在一两年内退出市场,就是无稽之谈了。 $ J* d1 C3 m) g1 x" n! c( A . G+ @6 b/ w9 B( G# l9 b Wesley 来自 http:// : 9 S8 @: d! Q+ m. o6 h1 ?# s
{/ G! F. R: w1 c8 s2 R* D |5 @
恶魔吹着笛子来,你的观点很有启发性。能不能写一篇或推荐一篇剖析、比较Java开 , B& V" |1 p( V' }3 D$ p发工具的文章?比如Visual J++, JBuilder,以及Symantec和IBM的对应工具。(可能和 & E* }5 c6 X7 B2 f/ a5 x3 c
本站的初衷有些不合^o^) 6 N" H W- U4 `- l- F8 b$ d2 A
1 O2 T7 U6 r w7 a# Z& \; ]& y LeoCN 来自 http:// : 2 Q6 @( g/ f: _( j4 ?4 \
! e( I! L( i; L
It's not a time for us to determine which language will more better! / X5 T2 ~3 d' p* ~6 H5 N J+ p1 N0 }4 N1 j9 g b2 X& y/ h in factly,In China,too many corporation just writting some codes for " h' Z9 J" H3 L0 |0 D
( P+ h) R) T" V( z+ i3 g) r
enterprise's MIS,OA,ERP or other application.It do not need so speed 6 O8 u/ F2 ^2 j/ G* m 1 t$ Z3 Q. f+ T
and do not need so good original code. just want more data,more easy and m ' M9 v6 |1 n. o( V. h4 b1 B- K' }ore quickly. 1 z: G( b t/ T, M
$ D# P. a r" }; I8 l& E
so c++ is not a choice in such enviroment. and u know,many codes we write ( d1 ]% R/ A3 D G& g9 ^5 [- S* `today will be useless.and there r so many easy tools such as VB T6 o/ l( q+ o7 E& X" ^; W g
8 p# z* J' O# p
for windows designer, Developer/2000 or PB for database,Domino Designer fo % `+ O* e6 Q$ `! c) m% n! J
r OA application,why c++??? 6 t& A0 q, L g
! ~; e4 b6 S' j+ A
in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. $ W9 u5 o) P0 `1 L
, X1 H4 A1 E3 i' ~ but now i hate c++, it has waste my time! my corporation do not need 0 u. W* p0 ]' n0 P) V 0 g# ^! X$ j( j( {2 B! M" G5 z c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc ; C X w- E0 X. ! }7 I" ]+ f( w; X$ ` A ' z0 G3 u2 V W so, a tool is just a tool,if the advantages in some aspect of the tool 6 d7 G" t* W6 s5 S( n8 b) ~
. f6 b$ E" {7 i- O9 y, r8 l u needed. it's will be a good tool for u. others it can bring u unfortunat ' v9 J2 w* ~. |3 R+ tly! : P3 M3 P# B, k) b / T6 D6 |8 W: ?$ |/ x: S! o 恶魔吹着笛子来 来自 : - I9 A, y7 T; s, B2 e- a
$ Y8 e3 r! v* z8 ~7 ~+ h7 J+ T
果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 3 T* c Y _. T" L2 z
的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 . l* ^5 W- u. x2 ?7 ajava程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 9 h. d( k# P7 m3 K) f* i# Z
司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 & J, e( L( m& W9 ?
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA 3 Y+ ?# I' e Y. K/ z' R
VA是什么样子.NET就是什么样子. ! U( B* x) D, B) e+ w- i % A8 E$ I) t6 n' x / l5 o9 G( u) L, w+ \ $ X5 a3 {5 G) ]- J8 } 恶魔吹着笛子来 来自 http:// : " A0 b' _! Y0 G* }) ]* W
, ^1 @- d- l, t# T4 c3 J. G 恶魔吹着笛子来 来自 http:// : . ?7 z1 N) x- z6 J1 b" P. _# Q 4 C3 W2 _. v+ e) n- | 而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 8 [) @" u% q2 P
.对不对. ! _, M! `$ q' o( |% P 3 x" B( T) o2 s. o xcc 来自 http:// : 1 x: M0 T- p; r8 y) o& r ' p/ U, e' v5 `( @ 同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 / p0 ?4 x, G1 F2 k7 c5 C. r 1 j. {" r6 E; ^9 A3 Z NET and C# Questions with Jeffrey Richter % \+ q! y! }* b' d \8 _; L
; i$ [, N: R, D4 H( E7 w/ I
In the weeks after Microsoft made a huge splash in the development communi 5 i. {: M! A2 W5 L) c3 L: S
ty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter + i: j8 n" ]) R5 a3 Z accepted our request to field 20 questions from our readers about these new " u" b6 A3 J5 X- y2 {
technologies. As many of you already know, Jeffrey is a cofounder of Wintel ; c7 r; N/ F9 k$ ulect, a company that specializes in Windows & Microsoft.Net training and deb 3 L% z9 R( P* @ x9 w( \
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET # L g/ y/ d9 j% t1 A: B$ PCommon Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio , Q: W8 x! V5 S% D9 p7 Ans operate. Below are the 20 most popular questions that were sent in and Je # z: x S; v' L" r$ U
ffrey's responses. 8 A- K2 L& s& B7 L; i$ R * f& N& U4 [. `# o4 h3 `. r! w: r
For Visual C++ developers everywhere still trying to get a handle on all t ' x; a$ X/ A; x! ?8 W$ Dhis: Thanks Jeff!! * m: X) @& d$ {
5 g8 y1 B; l( q8 F0 [ 7 N* {& v* S/ w- [+ n
Question #1 Is .NET a runtime service or a development platform? $ b' B9 b% U2 N1 y 0 {8 L$ M! F; L% \; ~! }/ N Answer It's both and actually a lot more. Microsoft .NET is a company-wide ; T& @5 p) H8 N/ t* @0 v* U- p& O initiative. It includes a new way of delivering software and services to bu 2 _1 F4 b2 O" F6 G
sinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The 6 i+ s5 p$ k! ]- Jframeworks is the first part of the MS.NET initiate to ship and it was given 4 R V3 d/ G" G* g2 w
out to attendees at the PDC in July. The .NET frameworks consists of two pa 8 a9 r2 H' f% w0 L, Q7 Wrts: the .NET common language runtime and the .NET class library. These two / h* c' ]" r$ tcomponents are packaged together into the .NET Frameworks SDK which will be ! M) C. ?# b' m- Favailable for free download from Microsoft's MSDN web site later this month. ) o+ [' d/ ?6 b! f5 B
In addition, the SDK also includes command-line compilers for C#, C++, JScr , b( \% U8 [5 o5 U, X" a. eipt, and VB. You use these compilers to build applications and components. T ; A& M9 R* A* U% G$ V3 `! M7 E0 I+ n
hese components require the runtime to execute so this is a development plat 4 F% z/ b9 |- ]: I7 `
form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e ! K4 D I" S) v- h- u* e3 vditor, wizards, tools, and a slew of other things. However, Visual Studio.NE ) F' [+ w( s% U0 ^& ]T is NOT required to build .NET applications. $ b% ~5 U# Y# y/ I0 h
7 }3 j1 w }* R* _% ]$ m, [ : ?# N1 D" ~" s$ `
Question #2 How likely it is for C# to become a general-purpose (meaning: & W2 n. e x# T% j$ [, \
not MS-specific) language and if so, have any other vendors committed to pro - {4 p7 v2 Q/ x* O/ |3 `1 h7 X
viding compilers on any non-Windows platforms? 8 Z+ j i- H1 d ^$ r/ \% [/ ^ . i/ l, M& X) D2 U+ M$ | Answer It's hard to answer this right now. I have been programming in C# a 1 m% j2 ^" x' a$ X
lmost exclusively for about the past year and I love it. It only took me a f 3 V; b4 m; f) m( |( [6 Uew days to learn most of it since it is very similar to C++. It was designed 3 X& ~9 n5 ^# X* b
to compliment the common language runtime and I think that it's unlikely to & z M" g; L/ o; B; D gain much momentum if decoupled from the runtime. However, you never know. M3 }8 X8 B3 o. ~- p8 pMicrosoft is submitting C# to the ECMA standards body so any company will ea 3 g1 \5 j: V& r+ Xsily be able to produce their own C# compiler however, without a runtime, th 6 G( `7 b) }/ K- U$ h- g
e compiler itself is not that useful. I'm not aware of any companies current # D) F0 G0 V' z9 Y* o9 }' Vly working on their own C# compiler. Certainly, porting the runtime to anoth % U* v' |1 t! ker OS is no small undertaking. $ Q5 D* W [6 s
, x1 f# l6 L- b2 F, Q9 C2 u# K
! t" j; Q' W; D3 g& L+ _& K
Question #3 Can you tell us specific practical problems that C# can fix be 9 z+ L! B4 h$ ?
tter than Java? ; t3 J+ I6 q( @8 g; [ h& A 7 {5 C2 t; \% H Answer I must be honest with you: I have never programmed in Java. I know ; F. b; ` r5 N+ |2 ]% c3 z U
what C# offers the C/C++ programmer: simpler syntax, components that seamles ( G9 Q7 t0 j. ?! _% v
sly fit together, type safety, and so on. Other people should be able to add : g5 g1 O: [; k7 Z
ress the C# <-> Java comparison. : U, S! @, i3 T4 r3 D$ e) E
4 p: l' P! W; M" N: Y4 b0 L8 d$ ^" c
: \# }% h% F$ D% C3 | a: ~+ x$ a; |6 s Question #4 Will ADO+ be the preferred and most efficient method to access ; G1 K2 W# @; T* J
databases from C# or will it have it own (or .NET) class wrappers for the O 3 k# I. I4 m- |: x) G! X& _
LEDB API? 1 g+ i& \# E- E# a1 k" F 5 g7 L( B# I" K$ l5 j* Q( J
Answer The .NET class library includes a System.Data namespace with many t % m0 j, x& }8 l9 Z3 ~* ]7 b& ]- N
ypes for database access. These wrappers will be the best (and most efficien ' v d; f$ s. o l6 |% Yt) way for a C# programmer to access data. 1 ]1 \# a& R1 s: R % i# }' q7 b- e. x3 e
! @0 ]1 M% `' B+ P v; } Question #5 Can C# be used to develop Windows applications or is it soley 1 r9 _% C% ?% B; H+ d. e7 Cused for developing distributed applications? ) ^0 K6 e* U$ n1 ~
- d% i9 m7 V6 x' C
Answer C# can absolutely be used to develop classic-style Windows applicat 2 |4 x8 `( g2 D7 e+ jions. Actually, this is more a function of the runtime, not the language. So 0 Y1 @% i' V3 u& @
, the runtime supports console apps, GUI applications, NT Service applicatio $ ?4 d+ t. e" i1 Cns, simple components which can be used in applications, web pages and so on ; `* \7 E! W! \9 B T. You can't write a device driver but that's about all I can think of that t + Y9 l( w! T( U0 E8 r
he runtime doesn't support. 0 ~6 {2 O: e% L1 N* g. X' C" x ; w9 a4 J% @% T
$ ?( r! G. B0 R# v U4 w Question #6 What is the C# relationship to WinForms? + b" M' `' u3 S6 a7 x% v# F+ g4 h % Q3 D* {! _, c2 w1 a
Answer Win Forms is a set of classes in the .NET class library that wrap W ' ?" s# c# Y" M6 ]% P
in32 windows, brushes, pens, etc. Any language targeting the runtime (includ 3 _" L9 {4 I4 m+ S* }: a/ F V% x+ Q n
ing C#) can construct instances of these types and manipulate them. This is ' h- E3 n+ Z8 c# z+ r! s; K' k+ J
how you would create an app like Notepad, Calc, or Wordpad. I know that Win $ i' G5 A9 V3 u+ Z; {
Forms has similarity to J++'s WFC library but I also know that there have be B5 U B6 ?; W% u2 gen some major changes. ( p7 j, T. _) K( b! R' }
' `- _; @% C( a1 T! m * Q0 ?% X% n2 e
Question #7 Rumor has it that the C# language has been submitted to the EC $ z9 ?: U5 g" } A; g- ]6 h8 C N
MA for ratification. Is this true and what impact do you see that having on : w- _1 m1 n& I7 O) Q6 Xother companies adopting it as a general language (such as C and C++)? . F0 w; S! M a* U # o n1 |, G1 M* {, X' {
Answer Yes, it is true. I pretty much answered this in question 2. + S% _2 j$ t1 B$ E% S6 l: B1 Z . s, g6 i# T' X, P: c+ r / w$ ]" `$ P' q8 ^ Question #8 Which will be the role of ATL and COM in the new .NET technolo ; ]( }; R4 ?; R
gies? - [: B c/ W# F% t c1 L' T6 Q: o
2 `" |# p S; V1 l. [5 `/ z
Answer The .NET frameworks offers a replacement for many existing librarie 1 _0 C& c2 P4 J9 ls, like ATL, MFC, C runtime library, standard template library and so on. .N " r2 g5 `, J% T( G" u/ GET programming is significantly easier than using any of these older technol 5 W! O4 _. K" s
ogies. For this reason, I suspect many developers will move away from using . Z: |' b% Y3 i+ t; j
the older technologies. The older technologies can buy you performance howev . X3 g# i0 J: V/ P$ h6 Q Ber; so, some people that are very concerned about this will stick with what' , g2 K. J x# @s around. As for COM, developing components with .NET is orders of magnitude , o* j4 t, Z' n! {# |3 M* `4 r easier and the interoperation between components pretty much happens for fr 3 G3 H1 c/ G, Hee. Again performance may be an issue for some. And, for the time being COM+ $ _" A1 j5 O: I
services, like transactions, are not being offered directly to .NET code. Y 2 t- l4 J/ s D; l
ou can still access these COM+ services but .NET code must incur an interope P m: j6 O6 krability transition, which translates to a performance hit. ' K8 R' O! r: \- k
3 F* }3 r/ R8 b+ P
1 ^( o, s- c1 @# w Question #9 Why was the templates feature not carried over from C++ to C#? 6 L' A) i6 B) b: j" Y: e, B
% V! x4 g( y' R$ Z" K& _( x
/ T7 g( V, l0 m1 `2 P1 Y Answer Again, this is more of a runtime issue than a C# issue. First, temp " P' `! @% `3 h% W; @* j8 c: u7 n7 ^lates are difficult to implement and Microsoft choose not to do the work for 2 h) C' n5 z; } Version 1 of the product. They may do templates or something similar in fut % s/ {4 R+ N4 a$ L% `2 g7 ?
ure versions. Second, since the runtime is a multi-language runtime, introdu ) z: j' f6 S* D9 G3 Ccing templates means that all languages targeting the runtime would be requi 4 ~; k% Y; V) [8 ?. bred to support templates in some form. There are a lot of issues here that n 7 p/ S( A) q! u% E: o/ Z
eed to be carefully considered. V. |8 i% r& S3 ]4 X
" ^7 q, \( y* h G. t1 {" l2 m! } U: z1 @ Question #10 Will C# replace the pseudo keywords that clutter ATL COM code & @( a" p- T' r: F4 x7 N9 S
with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX 4 Y* V$ n @7 K
XXX. , i% ~6 X' j' Z z- m( {- O# r( X ' J2 o X6 K: n; g0 t5 r x% Y Answer Absolutely, all types have new names as provided by the .NET class + Q \2 E4 z* i, I' i; e; y- m
library. 6 ]6 _; F3 \: i9 O ) X. t1 y8 N1 a, O# }: N% C / y+ H3 O" ]- q! v6 J3 H: o
Question #11 We've seen managed extensions, but aside from that, what futu # D# F4 Q$ {% ~" u: Y
re does C++ have at MS and in .NET? ; L2 H' B: r7 M" ]
1 ]9 \4 D. I$ n7 N" p/ M) d
Answer C++ is unique in that it is the only Microsoft language that allows ' k; f# T- ?: K$ O% g% r- D the developer to write managed and unmanaged code. So, I can easily see dev / }& V& u2 b2 \7 Qelopers writing in unmanaged C++ for performance-critical algorithms and the ) j) g4 Z. K8 R8 [# P) q. g
n using managed C++ for type-safety and component interoperability. I'm sure " }- w4 B! h5 @8 R$ d Microsoft will keep C++ going for years to come: device drivers need it, Wi . P5 n0 K3 v( [# G0 s
ndows is built with it, SQL Server< Exchange, and other BackOffice products / R9 g( W$ ^) m" l( C2 Hwill probably use C++ for a long, long time. $ h- w( O- Z- z7 o2 r+ b * ~ q; A( X6 T, E: K0 i 4 ]% D2 S1 A9 n a0 H6 O& ^ Question #12 If .NET supports ActiveX/COM, how will security be assured if ; K" F# m. L/ o) E6 ~2 b5 }
a C# application runs from within a browser? % F# y) t& _* H : J6 p% J* w! t6 Q* P; y$ o Answer The .NET runtime offers code access security, which allows an admin 4 t2 L8 f# C/ Y8 kistrator/user to configure security based on code identify. By default, any 8 U. w# H$ d! r# K8 R5 |4 |
code downloaded via the Internet or intranet is untrusted and will not be ab , N P O* d4 g& F6 o( v S7 |
le to access files and other resources. In fact, when I build a console appl {: s" g% D" x7 D9 t! ?
ication and run it from a network share, I get an exception when it tries to 9 ~0 C( V. d. A" D+ r6 i. L access certain resources. If I copy the same file to a local disk directory + F! H, j) x% @+ d" p and run it, it runs fine. Code access security is integrated with the runti 4 A# f; {9 A4 [* Kme and is too deep a subject to cover here. 6 j) H* T% P+ k V% m
0 W. [+ }6 K& {0 k( L; ?5 F
( F9 L F. y' e. w1 u Question #13 With regards to the .NET runtime, do I need it on the machine , O; h. I) t8 E' M that I deploy C# apps on? + Z6 U: [1 @9 Q1 [7 P
* ?9 x6 |0 u w$ P( s Answer Yes. All managed apps need a manager; the runtime is the manager. M % P! V- {5 S. s& f9 n( d1 U
icrosoft will eventually package the runtime so that it is freely redistribu / M/ G$ q% I2 Y" Z, M- x! ^. U6 V
ted. For now, end-users will have to install the full .NET SDK from MSDN web : `* S* u- H6 A' \5 ^6 I: i site (when available). This is similar to how VB developer must ship the VB 0 m. ~( F# t2 Z% W9 p& |
runtime today. : F! y4 b3 m* o
p7 A5 J4 z# [ : \. X9 e( U" v& O Question #14 There has been mention of being able to derive C# classes fro + `2 W# F- G! {& Y: X2 r. `5 qm VB classes. Is this true and where can we see an example of how to do this - e# r* ?' @ o! y) \8 @. c3 B. N5 w
? 5 |2 c7 m+ l u; P: A8 \: E ) z0 `; h5 V( A. c0 ] Answer This is true. In fact, any language that targets the runtime can de 5 P% r% S: K, E4 B! O* h' a2 F8 I
rive from any type created in another language. Also, the Visual Studio debu & |$ O+ w3 f( {! j% w2 ~; G' ]gger fully supports debugging across languages. Each entry in the call stack 3 Y9 R: Y5 ? V* N( Z; P3 u$ U! p window shows the function on the stack and the language that the function w ) K9 x1 n, ^& G8 J2 y( d- i
as written in. This is very cool and got a round of spontaneous applause whe ! e( t3 R2 ~$ I+ a$ w% d9 ?0 a
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t * X( c$ n$ d- P) eo do this. It's really quite simple. Actually it just happens, there is noth ( ?" G8 n! Q4 [- g9 H3 Oing for you to do. You can also throw exception across language boundaries a + i; k7 T; }8 ~# `, g; G! l$ k$ F9 rs well for error handling. , u% B. V) K5 e% Q8 f. @& z . r1 N; s% P- {
: V h+ F/ ]. D, X6 g Question #15 Can I derive a C# class from a C++ class? If so, how? 9 ?3 w9 v6 W$ a: E7 N3 h + Y* {$ ^1 J# k0 H) e7 |1 n1 R Answer Same as the answer above: Any managed language can inherit from a t ) p3 h2 d! @0 r
ype in another other managed language. If you use native C++, then you can't ; w9 x+ L3 Z- |
do this, however. , h' N$ p6 X& c' y6 o9 J% l 6 C" p5 g3 [' K* ]% b1 ^4 b
1 i' p" j: ]3 K1 Z0 P* R Question #16 Will the new version of MFC have the option of working in a m 1 ~9 ?, M4 ]' f1 N5 I4 m* N" B9 Uanaged environment? 7 y% C( K2 v3 R) }' O! B( I0 J 5 e& Q# g; q! y+ O+ I5 P# | Answer I haven't been tracking the new version of MFC but I'm pretty sure " N& ?. s0 D8 W+ Z' S$ ?
the answer is no. MFC is all unmanaged just like it has always been. For man + T9 e% g/ Q9 c6 w/ o2 vaged applications, Win Forms is the window manager that people should use. 7 h$ g7 c/ X2 }2 u# Q$ ^% K
2 Y Q5 Y1 ?8 |3 T7 ^& s; s
+ p% t- }( D" [- G4 R
Question #17 If the new version of MFC will operate in a managed environme : n% W5 s* v" D$ I8 k
nt, will it have the option of building desktop Win32 apps and not needing . x- W* }# P0 z' k( O9 W
NET runtime support? P! W! d% O* v7 i6 }' H& B 5 ^* _0 ~$ Y( I# S: v% w
Answer I'm pretty sure MFC is unmanaged and will never require the runtime ( p! f q O u# L+ B! I
. 9 q+ i7 t( \7 | 3 `% y" j7 Z$ S* y( n4 P. y ) v' S" W2 _& G; y6 r! [# c G
Question #18 Stroustrup has been quoted as saying "I have not expressed a # M7 }: Z. j/ P$ c$ y0 Ltechnical opinion on C#, and I don't plan to do so. C# is yet another propri ' a' R) M3 o4 W$ O* P6 setary language specialized for Microsoft's Windows system." Do you agree or : }& ~+ W& p( `, B8 @do you think C# is more of a generic language open to other platforms? ) Y- U* Q- v3 H: _2 `$ V8 |
% A5 J1 g" t" f& |1 L' G: S Answer C# is a language designed for the common language runtime; not Wind 6 |# z; _, a+ q: d) J# u% Zows. The CLR can be ported to other operating system like Linux and Solaris $ b4 @% m" T! j6 L" eand if the CLR is there, then C# will probably be there as well. In the gran 0 }5 z; n' f: v. id scheme of things, C# is not that important or interesting. It is a syntax $ k. y9 t9 V! f, _' Kchecker that spits out intermediate language consumable by the runtime. You 4 f. P) X% \4 N* V9 e* N) E- I2 scan love C# or hate C# - your choice. I happen to love it and think is the b 6 l; ~" o& x& L8 U+ l1 Lest programming language for the types of applications I write. 8 M- i' K* N# ?, Y
' {7 M9 i) n* g( s
1 R/ `7 `) c0 z$ ^# C" }1 ] Question #19 I heard a rumor that VB7 will allow static linking of the run ; V0 r& V: K2 _; U Ntime, like MFC. Is there any truth in this? If so, will C# also be able to c & ]' X# h+ F9 Zreate standalone apps? 3 G" E- N5 @* V6 f3 u
5 @2 c* U A& @) o5 U+ c1 J( n" X Answer This is absolutely not true. No language will able to statically li 4 G8 {2 V0 V; _: \7 G4 e E
nk to the runtime. 2 u& K: o5 Q2 [% a# [) P 7 Y7 W5 @7 J) O" W9 h1 Q ' }) |+ E% y+ m/ T, r
Question #20 Does C# still use resource files? If not, what mechanism is p - z% U9 I" K. f/ f Z' p
rovided to allow for localization? / n: r* o& o, y" q, o6 C . C' E# K3 O3 f% j/ K& G$ `& {0 M Answer The .NET frameworks designers have created a new resource model. Re 3 ^2 @: z* {( Fsources can be embedded in EXE or DLL files the way Win32 resources are or r , f( u$ I. J/ O3 R4 L
esources files can now be stand-alone files like a single jpg or bmp file. T / g, t- i( a" @, G: e/ S1 R
here is also the concept of fall-back cultures. If the Swiss German resource & a+ f4 H R# z* g
can't be found, the runtime looks for the German resource. If the German re R& }6 f# a% D8 C0 p8 v
source can't be fond, it looks for the "default" resource. Each language wil 0 H1 M$ t1 ]5 nl typically be built and shipped as a separate assembly rather than packagin 4 q4 Q: h& z: a# }, j, F9 k
g everything up into a single file. Like code access security, a full discus ) R$ `( J3 K: q2 p' f V( T
sion of the new resource model is too much to put here. ! w/ K& V7 x+ C# R5 L& m: K! C
4 K6 r/ s: O: f- d) E: Z8 k1 ]0 T) e
* }3 V. L# S5 R/ N' t- V
5 L9 `* x5 F9 W. H
0 z5 v! D5 ?5 H; g% U5 a$ N3 g" T
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 6 l O. P$ G/ A# S
9 u+ |) n, S V6 t3 p0 e 我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 v" @: ` G) M2 t前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) # @) m4 H; b2 ]" R7 S
8 g! A( S5 ~' E, B- U6 G6 W* ^2 \
但没有一中语言是十全十美的, * x3 F% d$ r% t& E; N
6 C: o6 r& l. S$ ` JAVA,C#都不是。 / K0 ?) T% S' ]6 b6 l+ L4 V 6 f) a. [. m5 T 0 _) G, s/ Z1 h" X/ W+ N
2 g- r# i9 N" K6 q
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 0 f" I: v7 U3 {" U; `* | l 2 K! P# d; t' i A 》》恶魔吹着笛子来 , H6 `2 @/ i$ o8 R* {7 l " ^% x5 F8 h2 W$ t 你好, ) A2 K1 K, \# z
7 s* g, s8 \8 L4 m3 r: L 很高兴能够与你进行讨论, / Q" z/ C) Y2 o, R, T