" b9 y7 U; R( D9 X4 j4 U/ w- u LeoCN 来自 http:// : 2 z( `7 K6 G! @ ^: h
7 X- t- V+ C+ M; p9 ^6 U
It's not a time for us to determine which language will more better! : _9 L1 F' F* d8 i$ n4 H+ b: \2 P 0 c2 v) j* r0 u6 R% N in factly,In China,too many corporation just writting some codes for + G/ \, W$ a# f& A! n+ y0 ?2 }& E
: `2 f2 w1 H }/ ?0 B) c* f
enterprise's MIS,OA,ERP or other application.It do not need so speed - I2 o7 A' t0 a1 ]" P; @2 f
% |2 |, N# Y# R and do not need so good original code. just want more data,more easy and m " O" _! |7 ?2 H5 o$ V7 s
ore quickly. 3 a, p3 [2 V( [
' y1 }: A/ f0 b: U- C w$ w so c++ is not a choice in such enviroment. and u know,many codes we write & |4 I/ E* S7 E/ T
today will be useless.and there r so many easy tools such as VB ; t) l( h2 q4 C! [8 s
9 I( D. ?' X0 k& {! \' t for windows designer, Developer/2000 or PB for database,Domino Designer fo , l7 ~' ~; O. W2 T1 `/ F4 Vr OA application,why c++??? - @( f; ]2 z( y( \3 |/ o1 z
$ R) d: }3 i( O! u1 {
in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. ) F1 z, S' ^" b" d# k0 ^ , L: F7 n+ q7 {$ \, ? but now i hate c++, it has waste my time! my corporation do not need 7 j) I& }* [& {' L
* z J+ T4 O& E2 ^. E0 ?& s6 V1 q c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc " c, i7 y/ X8 w7 O. @, n. . c( o* h% {- a! T$ n6 J# m
" ]' g) i+ T( Q' g
so, a tool is just a tool,if the advantages in some aspect of the tool 0 i& W, i/ T- K: e h ( H+ s( ]5 y/ H: d3 W6 L! o
u needed. it's will be a good tool for u. others it can bring u unfortunat 6 V5 U u$ |6 {, D- n$ [, p. Aly! ! u& o" p: G2 Z, u: h
- ~7 V1 g! @! G! E
恶魔吹着笛子来 来自 : ! @4 @' `/ v, J. h * {" k+ E+ F% N4 {/ c6 s" F4 {
果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 % C2 t9 t) A4 y* |8 m/ d6 c0 M的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 ) Y5 E; V6 G! |$ x% V4 }java程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 ! ?; ^) m4 i- F5 R" M/ m) N司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 , [. _! l% B: A- b9 o3 ~
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA 7 r1 J u9 x, e: |) F
VA是什么样子.NET就是什么样子. - a" x( E `. }/ n
6 y5 x; i- @+ {0 G$ D8 C/ e
+ o( P$ ^! h; f& w* j- A * y6 H6 U! A' l6 o; |- J 恶魔吹着笛子来 来自 http:// : , _" R0 s0 j( w7 j ! I3 R* u4 ?) L, |, r Wesley你好.关于Java开发工具的问题.从我的观点来看,目前的Java开发工具没有一个 ' {1 t3 ?% w/ Y
令人满意的.最主要的是,在技术上考虑的太多,却不像MS的开发工具考虑到程序员的方便 4 v* Z! t& y& l7 ^8 j1 X( W9 s/ j: q(vj++是另外一会事情我后面会讲). 2 p l6 e" E$ O1 D2 W) ^$ K
! F( m( T! Q6 Q% U
基本上流行的是sun的jdk,ibm的visual age for jave,samtic 的visual cafe,和bor 1 }6 r& M( I+ |3 ?0 i) M ^: ^land的jbuilder(vj++基本上没有什么人用). 4 j0 [) K* C1 }, }( k5 p0 D$ _6 Z t 1 n$ Y) r7 e" h+ a% i/ l 在这几个工具来讲,jdk是老大哥,但是仅仅是一个command line compile.在某些方面 ; |& \: P" z, J# A, J d
用ultreditor+jdk会比较方便,譬如你的机器的配置比较的低(memory<64M).一般来说,几 $ ^1 _' U- | y9 }" t" ?$ t7 y乎所有的Java工具需要的机器配置都比较高. ) `$ @7 `- w" e/ [9 \% l
# d( H0 u+ U+ F- x
visual cafe是第一个可以使用的Java IDE工具,我当初学习Java的时候就是用这个.它 # N9 p" ]+ R' P1 _) e
的配置要求比较低.一些比较低的版本譬如1.5 2.032M就可以使用了.但是现在最新的版 4 D( x6 P. b& a本5.0的要求就比较高了,可惜2.0以后的版本没有用过.cafe的IDE开发也不是很方便,懂 H7 L4 t ^! }+ k一个窗口西一个窗口比较的乱.而且bug还很多.有的时候trace到一定的地方 ( M; E8 Z( D# r
$ @" \3 h) Z7 l+ W( P4 n% p$ `
就会crash.samtic是一个系统安全公司不知道为什么cafe却那么不稳定.而且从技术上 / B' F. ]) m" ^- a$ b
来说到目前为止还没有完全支持java2.更不要说j2ee了.从帮助来说cafe的帮助基本上还 X8 E# W5 g& y/ ]! o是jdk的帮助没有什么特别的地方. ( ]& t/ M% U8 }% M + K, W6 q" q) U( A4 O
IBM的东西往往是吹的比做的好.visual age很复杂功能也很多.支持100%pure Java和 % p6 r+ M+ c9 X3 C; j6 s
J2EE.但是使用起来不方便,当初为了设一个class path找了半天的help都没有结果.后来 # e, U0 g) `) L2 u3 i
听别人说要在nt下面设置环境变量才能成功.而且与其说是visual age还不如说是comma ! G+ S2 q G( T7 A' x$ h- h1 W
nd line套了一个windows壳子.做application还要自己写layout代码更本就不visual. / c$ ~4 D- n. m& c5 _" Q9 l: ~
! _+ f( ~/ E/ \8 N IT世界不光只有网络,还有其他很多。 2 J/ r( |. d5 H; P; D
$ c0 F& p. i% |* V 所以某些工具在一定范围内适用是正常的, 1 ~; @! k, _( J! _# w 9 C7 n4 \1 _" H3 {) C' M2 s1 d 其实在国外, 6 y( \% X; f7 }& C; Z
6 g3 K, P4 q& Z) y SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, " c9 H1 L4 {* h2 V- L" g
) f" n! k& c( d, c2 |" J9 |
这和速度有关,当然也与MS对JAVA的态度有关。 e- {6 O' E% f) C- I8 W
) ^9 [9 o5 E5 q+ g5 X3 G; r * }2 g3 H2 w4 K) B" Y( f 不过我一直认为C/C++不会因为JAVA的出现而消失。 & {4 R: u: r; y9 H1 s( t- K
: i& D1 {( u6 t* F8 e 就象COBOL目前为止还在使用一样, 6 ?% D0 P' y# A w5 `' I
, i3 i, g4 c9 @" T$ z / O1 R9 G! v8 [, l- D8 T
不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 9 j5 I5 }7 g2 N) W+ F$ n
是不得不承认的。 - N" }/ n& p5 F1 @
8 m7 ~0 R. n j/ R 恶魔吹着笛子来 来自 http:// : ! v( s; i( |& c% k/ m# r3 w* k 6 G q+ u2 @. Z2 J" b 是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 - m p8 O* ~0 j' n$ A" k* D 6 z- Q9 p4 c9 k; G1 w c/c++的升级换代是在所难免的.对么. ! v0 V o3 D* a( F$ ~ 4 |8 b6 j* M4 t6 ~& t 恶魔吹着笛子来 来自 http:// : 1 m; ]) R5 c0 H, o# @! h
# x$ z: m5 S1 p6 t# F
而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 " L% B5 G1 a0 `% k+ X1 z1 }: s- J F; e.对不对. 4 L; _( i( [* T/ a- _! @1 u
2 O( R2 S2 C3 w xcc 来自 http:// : $ B3 ?0 B6 T7 C, m4 Q5 J; q 0 i1 L4 b. @ B
同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 * h* c( I- \3 v/ S7 z7 O 7 u( ^1 j5 _* u: @. H M/ U- K( L
NET and C# Questions with Jeffrey Richter 1 Z+ [0 N% Q2 K8 i" U- J' V : R7 `: I9 u; ~; i" U
In the weeks after Microsoft made a huge splash in the development communi " h r( G% t( I+ h: ~
ty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter 6 J0 r# }! @7 I& C H9 w accepted our request to field 20 questions from our readers about these new 5 R. c. P( i2 D" f$ D technologies. As many of you already know, Jeffrey is a cofounder of Wintel 4 l8 i" Y& c: \. ?
lect, a company that specializes in Windows & Microsoft.Net training and deb - j0 {& O" K$ o
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET % m5 N: e; b; Y- M) ~; GCommon Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio ' m- G$ Y5 Y# g8 jns operate. Below are the 20 most popular questions that were sent in and Je $ e; V* |9 u9 `7 s2 p- z. D; E2 F* nffrey's responses. ' b9 a; n7 M8 G( F+ |7 d# K+ q : z4 L, V& T! a For Visual C++ developers everywhere still trying to get a handle on all t $ t4 J( w: C+ v0 {/ k) D" F
his: Thanks Jeff!! : E j @( K3 u9 o1 D* K
( Y! ~ }# v- ^8 q% a7 K
' H8 Q; w% R! v8 [# l2 q
Question #1 Is .NET a runtime service or a development platform? 2 a* c {! x5 `9 t) p) y2 x; p 7 C# N0 A# r7 K+ W% m1 v Answer It's both and actually a lot more. Microsoft .NET is a company-wide + ~* z/ w% Q4 |6 `6 Q initiative. It includes a new way of delivering software and services to bu 8 q) e+ V: T0 i
sinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The 1 i2 [& h& b& P5 ^9 \8 T2 W
frameworks is the first part of the MS.NET initiate to ship and it was given 0 O. {) x, i9 z4 G% E r/ i& j out to attendees at the PDC in July. The .NET frameworks consists of two pa ! x {' P Q4 \) I- k5 \( g, b& mrts: the .NET common language runtime and the .NET class library. These two $ [: ^" a1 M0 N. M5 Bcomponents are packaged together into the .NET Frameworks SDK which will be 8 I7 f$ ~! j+ _7 tavailable for free download from Microsoft's MSDN web site later this month. 8 D6 S2 n) [) Y' a
In addition, the SDK also includes command-line compilers for C#, C++, JScr + g2 l6 i3 A$ B) S# G
ipt, and VB. You use these compilers to build applications and components. T + E& ^3 d) m, r: s2 E# S3 J
hese components require the runtime to execute so this is a development plat ( T( L4 C3 @- Y* W# S6 v
form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e " d* f" M' W7 f; e2 Y& yditor, wizards, tools, and a slew of other things. However, Visual Studio.NE + h3 Q6 P" @1 n Z" l. _+ k, C& ?
T is NOT required to build .NET applications. ) u8 }5 X6 Z$ v3 m 6 G2 {* n4 D$ @/ C+ z6 A 8 n" T- A: m) f: d" o% p
Question #2 How likely it is for C# to become a general-purpose (meaning: 1 h- l2 _, q5 }3 q! Q
not MS-specific) language and if so, have any other vendors committed to pro ' ^& \) \% N. G( aviding compilers on any non-Windows platforms? 2 X) c' c2 S$ [2 ]) N
8 p" N1 s0 _( l* P+ P6 c/ A Answer It's hard to answer this right now. I have been programming in C# a 2 Q8 u6 R9 W9 ]; h2 X' }2 h+ b- Klmost exclusively for about the past year and I love it. It only took me a f ! r) s* s& e& Z2 P/ dew days to learn most of it since it is very similar to C++. It was designed & }# X4 I. N. c/ s7 U6 c9 K, M# q
to compliment the common language runtime and I think that it's unlikely to ) ]) V# H; d2 {& D& Q- {; n gain much momentum if decoupled from the runtime. However, you never know. ' z! H5 a2 c2 C0 j% ?7 M+ q- ?5 @' u
Microsoft is submitting C# to the ECMA standards body so any company will ea 4 W% H9 F {5 M o( K9 j+ @8 O
sily be able to produce their own C# compiler however, without a runtime, th u" a+ w$ g2 U$ ?, pe compiler itself is not that useful. I'm not aware of any companies current 5 w$ u4 e# e: u: a/ G& \0 M5 {ly working on their own C# compiler. Certainly, porting the runtime to anoth ; x: T' P! R1 W. ~, W9 W D+ t3 ier OS is no small undertaking. " b) ?( W$ _0 s) H. S2 x% p
- g! F0 ?# q/ N: H' i: e
6 I8 F+ V2 n. y) r; i' B4 c
Question #3 Can you tell us specific practical problems that C# can fix be # X- F W. o( ~: z. Y" d! Z, P
tter than Java? - j9 Z% O8 c+ K+ d7 u8 P+ ?- b
! U' q9 L! ?6 t& D6 g- d+ f
Answer I must be honest with you: I have never programmed in Java. I know 5 }% D3 X6 Y2 g
what C# offers the C/C++ programmer: simpler syntax, components that seamles ! o+ m5 P+ e8 ~0 e4 n
sly fit together, type safety, and so on. Other people should be able to add 3 K" [3 a6 i: }+ I# }0 h& u+ L
ress the C# <-> Java comparison. ; I5 W8 Y! H) ~4 h5 b
% y+ d3 L0 E! V' e6 `" W " B4 T0 ]; {0 K% W% Q& w Question #4 Will ADO+ be the preferred and most efficient method to access 7 Y7 X6 Q& t$ z" [5 T9 a* S) y databases from C# or will it have it own (or .NET) class wrappers for the O 4 ?; _8 u- C0 \: p/ Q1 ?0 y$ A+ pLEDB API? 7 Z7 j1 o& M% b! v/ E, ~5 E $ J1 w/ c4 [; }% T! o- T
Answer The .NET class library includes a System.Data namespace with many t ! A- A0 z; ?( A5 f. Types for database access. These wrappers will be the best (and most efficien 5 E* h5 t# H" N9 v5 u; r& m$ O
t) way for a C# programmer to access data. % p: Z" u% w, p# F# X9 c
# J! T0 Y! j* F: _0 S0 e7 z
: \: C+ A+ V+ M1 U5 g8 s/ E
Question #5 Can C# be used to develop Windows applications or is it soley ; \& g7 G6 d) j) Bused for developing distributed applications? - W+ H4 D3 M9 E- f" g: _
. M6 Y. H' w( E! n& F4 D! f Answer C# can absolutely be used to develop classic-style Windows applicat 5 ^+ b% {! X0 P) ]* C
ions. Actually, this is more a function of the runtime, not the language. So - O/ d1 f! N4 e# I7 H0 r' B$ p; I6 Z
, the runtime supports console apps, GUI applications, NT Service applicatio , y1 B2 j! Q6 {/ c
ns, simple components which can be used in applications, web pages and so on . i N0 d+ \) |2 W
. You can't write a device driver but that's about all I can think of that t ! n* ]* v/ o( r4 F' nhe runtime doesn't support. 7 x% F4 g0 v1 u
2 m* _! T0 h% p _2 D
E2 s. `5 |( r1 |8 i Question #6 What is the C# relationship to WinForms? 4 W& |) Z! L( W3 M3 ] - a* K6 b1 _0 D; G q6 K9 G; {
Answer Win Forms is a set of classes in the .NET class library that wrap W 5 ?9 {6 z, i) g% L6 `5 O
in32 windows, brushes, pens, etc. Any language targeting the runtime (includ ; g d) Y" R. w. x4 Wing C#) can construct instances of these types and manipulate them. This is ' E5 E# }5 Z) ?3 h+ k7 V- `, ?
how you would create an app like Notepad, Calc, or Wordpad. I know that Win " h7 W0 t7 K( L5 G* ?
Forms has similarity to J++'s WFC library but I also know that there have be 2 c, o& {/ W9 u7 f( s3 ~
en some major changes. 7 [9 F8 m- U- \0 @- K# }( Y0 D % e2 K( [1 [6 ]# i" e; i 6 y, B1 ]1 R1 ]: Q' K" e6 F
Question #7 Rumor has it that the C# language has been submitted to the EC 2 V, E) T7 v- ~! c) WMA for ratification. Is this true and what impact do you see that having on . q4 Y% i. u: `# E( L0 X- b) F7 Wother companies adopting it as a general language (such as C and C++)? / t9 b) U# L+ g. o9 { 8 c" z! T0 H ]4 S1 f l6 m
Answer Yes, it is true. I pretty much answered this in question 2. , ^; J& V& Y# U0 N4 A: D# |$ s8 A 6 d$ V3 T4 M# r& x. b/ {3 \ * O9 o) `" F% [0 f) C
Question #8 Which will be the role of ATL and COM in the new .NET technolo % h; T- T- b+ q, ]gies? " O8 ?5 |( V1 g- }
# ?% c8 P6 U0 |- ?7 @( m6 u& Y7 ~6 |
Answer The .NET frameworks offers a replacement for many existing librarie # i$ {$ H% F7 m8 U# P. j0 s5 K
s, like ATL, MFC, C runtime library, standard template library and so on. .N . g# m" P8 c( y6 Y& SET programming is significantly easier than using any of these older technol : x5 }1 N/ |5 a0 X( u9 q
ogies. For this reason, I suspect many developers will move away from using % I) L/ Y1 D/ G. J
the older technologies. The older technologies can buy you performance howev : `- Z& b+ g1 N( i+ g' q, q Y9 q
er; so, some people that are very concerned about this will stick with what' & h4 Y" v% g: _( ?1 cs around. As for COM, developing components with .NET is orders of magnitude ! q: v7 t4 N' u% l$ X" X9 _ easier and the interoperation between components pretty much happens for fr 7 o J" }, i( _. t3 p5 wee. Again performance may be an issue for some. And, for the time being COM+ & H+ l2 H$ x+ G' F" u services, like transactions, are not being offered directly to .NET code. Y ( q* F: j8 i5 s5 V
ou can still access these COM+ services but .NET code must incur an interope / M- u$ U- y4 G* N3 n1 q# [rability transition, which translates to a performance hit. ; a& @" A& D" n# g( Q
% ~$ ?" b X- @$ ?( E
& p9 S; k6 ^* q% o0 @5 J
Question #9 Why was the templates feature not carried over from C++ to C#? 5 J+ Q- i; l; D0 g T- G
2 l9 K) g0 M$ v: B
/ r9 v& S( f6 C% W0 A" a2 T
Answer Again, this is more of a runtime issue than a C# issue. First, temp ) `6 z& R# k7 f/ L6 y% O
lates are difficult to implement and Microsoft choose not to do the work for 3 Y2 ~ I: a! I% \ M% F
Version 1 of the product. They may do templates or something similar in fut 0 m6 e" O. [) c
ure versions. Second, since the runtime is a multi-language runtime, introdu # {0 ]; A& h$ \% N+ R9 Ncing templates means that all languages targeting the runtime would be requi 2 J& V* a7 V" J2 _) h) K9 t: `$ o
red to support templates in some form. There are a lot of issues here that n * l8 w& L7 G! R
eed to be carefully considered. ( p7 y" t( \8 z) I. b
; d9 _/ B3 t! V; _6 v7 j
* h$ y0 _9 C8 P8 i* Y
Question #10 Will C# replace the pseudo keywords that clutter ATL COM code / \; l1 y8 k, H, q! } with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX 6 }: E: f6 S; x4 x2 ]" zXXX. 0 @3 G8 o5 }' p/ }8 {2 `; n1 n + _( i3 r; v# Y3 ^. n' |3 U' A Answer Absolutely, all types have new names as provided by the .NET class " A: H: [$ G. \" Blibrary. ) T$ a/ p! k* ]: A" L1 d: I2 d6 s $ ~$ ^' o8 x& \! ^2 r7 m8 k
* ^0 r( s5 Q0 o* C
Question #11 We've seen managed extensions, but aside from that, what futu 2 h& ^9 ^% r4 V* e4 ^; s# b% N* k
re does C++ have at MS and in .NET? 4 a2 J, `0 d( O% k0 e1 S: \5 N
9 M; s" S. v. ?) l1 U }1 @: W* H Answer C++ is unique in that it is the only Microsoft language that allows 6 j: g G! l9 c2 o
the developer to write managed and unmanaged code. So, I can easily see dev 0 l" q. u2 |; B* W2 y$ t. h; q
elopers writing in unmanaged C++ for performance-critical algorithms and the - A+ E) W* C' ~; }
n using managed C++ for type-safety and component interoperability. I'm sure f4 m- o" g. i* m) o3 \& x
Microsoft will keep C++ going for years to come: device drivers need it, Wi ; d4 C8 g# I, Q0 s+ \6 D
ndows is built with it, SQL Server< Exchange, and other BackOffice products * x2 U# ]- m0 b- S
will probably use C++ for a long, long time. 0 a1 N% z( x; j$ I% ]% u3 E/ d 6 s! X& W( c# Q
/ c8 r% ~) R! r$ k Question #12 If .NET supports ActiveX/COM, how will security be assured if 1 n9 Y0 o- f0 P: s) R: l9 M3 y a C# application runs from within a browser? % B' `1 d, E( t/ d" y; L8 q4 U
6 ?8 q T% }/ P! v& e3 c Answer The .NET runtime offers code access security, which allows an admin ! ^) N7 ~0 C" t- X1 z
istrator/user to configure security based on code identify. By default, any " Z4 w: Z+ }" k9 X( y8 _# S! bcode downloaded via the Internet or intranet is untrusted and will not be ab 3 C8 r+ O7 R& ?le to access files and other resources. In fact, when I build a console appl 4 w+ H. F- D: k( Z; ?9 t& Hication and run it from a network share, I get an exception when it tries to " B5 W3 f7 R6 ? E% j) u; | access certain resources. If I copy the same file to a local disk directory / H! _7 A5 n! B7 k8 u6 b2 D9 ~* c) E and run it, it runs fine. Code access security is integrated with the runti , z$ \! s# k \- s! A6 ], Pme and is too deep a subject to cover here. - o: [+ a. T$ V 1 z# b* M3 P: h/ F% l0 w
$ j/ X2 I+ }5 S3 Y9 C
Question #13 With regards to the .NET runtime, do I need it on the machine 7 `, I0 U( A% l9 \
that I deploy C# apps on? * v4 A f, N/ j! }, p- T& r
& \' T. o; _2 D0 B6 Q8 `
Answer Yes. All managed apps need a manager; the runtime is the manager. M ( d% m+ U z# X' ~icrosoft will eventually package the runtime so that it is freely redistribu . ~4 O% |+ ~. p# G! K( H0 U
ted. For now, end-users will have to install the full .NET SDK from MSDN web * s! h' l8 q- q2 ~) b
site (when available). This is similar to how VB developer must ship the VB . ]$ \3 l2 j7 l/ m runtime today. 2 B# J3 x9 L3 l " m7 g, H$ o, T1 \
) f: ?7 @% F9 R! z
Question #14 There has been mention of being able to derive C# classes fro 5 F) i$ w& C- j! u
m VB classes. Is this true and where can we see an example of how to do this # f0 r% T, W4 z D. E
? ' x7 t7 q0 ^- U' x, A# j
' d0 Z- w2 V$ T1 d S3 q
Answer This is true. In fact, any language that targets the runtime can de 4 D' n; M* X srive from any type created in another language. Also, the Visual Studio debu ; c4 F! P* b+ v- Egger fully supports debugging across languages. Each entry in the call stack ; M, `+ |" n1 c window shows the function on the stack and the language that the function w ' t6 a* T) a9 j/ z% P- Was written in. This is very cool and got a round of spontaneous applause whe 9 G( _( v; s$ Pn shown at the PDC. There are samples in the .NET SDK that demonstrate how t $ |" ^1 x' ]6 s& c% z
o do this. It's really quite simple. Actually it just happens, there is noth 0 }9 C0 K5 W0 H! ying for you to do. You can also throw exception across language boundaries a 6 c1 `" _% z; E8 J9 a6 {
s well for error handling. 7 u7 Z5 }' [5 o
5 i1 B! |7 r2 v, p 4 @/ d0 m/ i4 O" i- t F Question #15 Can I derive a C# class from a C++ class? If so, how? K; X( W* a5 e) \ 4 J+ P; y$ I u% ~
Answer Same as the answer above: Any managed language can inherit from a t ' I7 I, f* T3 G6 p4 z: c+ g
ype in another other managed language. If you use native C++, then you can't 0 X, S2 }3 x7 g! m; I& |% J
do this, however. ' z" Q; t- K, R* M 9 r2 P6 T5 t9 z }5 O) `
+ a. q' }) U6 U% L* |) J
Question #16 Will the new version of MFC have the option of working in a m ; A; V: a( [% _& n4 W# D \4 X
anaged environment? `3 ~" |! {' O [
- @$ }* U/ B# c( U8 {4 e Answer I haven't been tracking the new version of MFC but I'm pretty sure 4 h5 h- ~3 J* w; @9 |
the answer is no. MFC is all unmanaged just like it has always been. For man * ]% B4 k, \3 n/ C% Qaged applications, Win Forms is the window manager that people should use. 9 q4 B% f# P# C# [ g, N @" J2 u + K' l* B1 d7 v: e ) H6 V f- E- _8 N Question #17 If the new version of MFC will operate in a managed environme - r) d/ g& x% E% N& g) ]* gnt, will it have the option of building desktop Win32 apps and not needing . & n) [ o# u/ u( C' X2 V8 ?NET runtime support? ( d3 S* I. ^! `/ o9 W }3 n* D 5 {! I% i6 `- c6 B Answer I'm pretty sure MFC is unmanaged and will never require the runtime : v' m2 }2 c; @: n ]
. 2 r+ i; b* m0 V1 k+ X7 j* e4 B, | / [4 \- J, c4 j4 y" ~2 J" p: _/ | 7 ]3 g+ Y% o' m2 R0 z5 d Question #18 Stroustrup has been quoted as saying "I have not expressed a $ ^5 b$ Y9 U5 d" X8 ?5 z4 F+ x
technical opinion on C#, and I don't plan to do so. C# is yet another propri $ t+ R. x, g5 g4 ?: d. j
etary language specialized for Microsoft's Windows system." Do you agree or / V: Z3 b7 I$ A1 f: ^do you think C# is more of a generic language open to other platforms? ; L8 c+ L% s7 P2 _) s' J Q5 K6 r$ ~/ j- H& P
Answer C# is a language designed for the common language runtime; not Wind 8 ?: y* V- e5 j/ Iows. The CLR can be ported to other operating system like Linux and Solaris . v W/ W9 {) S; u
and if the CLR is there, then C# will probably be there as well. In the gran + F2 A& B; G' t* I5 |% b) d' X7 Y
d scheme of things, C# is not that important or interesting. It is a syntax ( |+ q9 B( s5 w6 H9 Mchecker that spits out intermediate language consumable by the runtime. You + C# }, y4 y1 u* h I4 n$ ?, Ucan love C# or hate C# - your choice. I happen to love it and think is the b # H* \9 s) p% C7 n$ D. U' r/ Y# Q2 Y
est programming language for the types of applications I write. 8 M+ a+ g9 h+ B
4 K# g+ F- A6 B4 Y
% |5 R( |# |% B, a. Z8 A
Question #19 I heard a rumor that VB7 will allow static linking of the run 1 S5 U8 v/ ?+ R0 G- j$ C l
time, like MFC. Is there any truth in this? If so, will C# also be able to c ! Z# L K4 f; b" v2 o0 {6 Yreate standalone apps? 5 D: Z2 g+ ]5 v0 S
) m/ u: U! G* @" d, }' R
Answer This is absolutely not true. No language will able to statically li & [5 a1 j2 C0 w4 l: a4 S
nk to the runtime. 1 M% y( E4 B% H5 m# o9 {( n 7 z) H7 R1 n' c* @' @* c' P ' ~( e8 x6 L0 w- t0 {) _
Question #20 Does C# still use resource files? If not, what mechanism is p 6 k$ f" x' r1 }0 f. y2 F! h8 {rovided to allow for localization? + R+ I% _: f8 X! T' Y& w
2 q; V2 |8 \0 w, [6 X Answer The .NET frameworks designers have created a new resource model. Re : K( v' W2 C) R, g! u9 ~1 asources can be embedded in EXE or DLL files the way Win32 resources are or r 4 i0 F* G) j' K( d! V( l/ _
esources files can now be stand-alone files like a single jpg or bmp file. T 8 L" _/ ? ?! u7 Ghere is also the concept of fall-back cultures. If the Swiss German resource 9 [/ H: V2 I' A6 j; S" q8 r
can't be found, the runtime looks for the German resource. If the German re + ?, f4 a7 p' B$ F5 \3 Isource can't be fond, it looks for the "default" resource. Each language wil . Z$ j: A! l$ z% |1 f& ]l typically be built and shipped as a separate assembly rather than packagin # V9 r$ Y& X- _6 Rg everything up into a single file. Like code access security, a full discus 8 C+ z! m+ ~7 i4 Z3 Q P% X1 u8 Xsion of the new resource model is too much to put here. / v" s) g0 M! ]- D: g2 j ! @- P8 x. V G$ y# P% c
. ?: T( o: A; z6 m1 y( p" T! g
/ ]: c: i. L! e8 C7 M v. T - {4 I; I& m$ S0 X: [ \- m wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 6 d! j, W3 S R. D: b
" @5 i9 C1 e; _: U" V; k 我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 . a# I* u4 L' Z- w前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) , e1 K' }. t" U8 B3 b7 H4 g 6 N5 Q5 a# p8 ?8 V& y0 g* _
但没有一中语言是十全十美的, . K' ]2 ?- w- }8 p1 H7 u8 D
3 Z" X. e5 i" n
JAVA,C#都不是。 7 y5 U+ ^$ {' h- H, N/ P
# I) V7 S3 u! D" v# `7 E- ~- g
1 P; x" c0 A- Y6 j4 I3 ?
. V: }' H6 H. J' `+ K& F9 A5 q; o: V 没有在全面的系统层次上思考,在整个计算机技术、通信技术、软件技术的 ' R- z1 e" k) Q o u c) f' u
7 @1 B/ r7 r) k. m8 O$ O) n7 C
整体面上思考问题,才是中国软件技术进步的道路和方向,而不是去争论用 + v# |) }! T9 S( x; J- I0 f
9 s1 p5 Y8 r* R5 L$ b
什么工具。另外,本人认为VCHELP网站在中国还是办得不错,但欠缺的是整体 3 A- Y+ _- M# n5 `8 Z w& O . x$ l. I' J; v$ h5 v 技术层面上的东西,而这一点在中国是尤其重要和迫切需要。