/ w4 L# d& L! n/ _0 z. K7 b" e6 n" O 我一定程度上同意 恶魔吹着笛子来 的说法, 5 U) S7 p* W! P( ], U/ }" b + d; j& `; w8 V1 K, } 毕竟VC开发速度是比较慢的, $ Y% ^8 o4 B- s" e* Q& w0 W , r! I* I- F# C/ u& _
而且硬件速度的大规模提升也为使用JAVA开辟了道路, 2 }3 c; J8 I/ v/ h
! r% f; R$ i% J- T9 C# H2 G' n4 q7 W
不过microsoft.net的目的是一定程度上改变MS的经营性质,和开发关系不是很大,但 6 Z ^5 B. h/ y- X# g# E6 p是MS的一贯方针都是在平台上为开发人员提供方便, , L8 M- b- ^# h! l |! L" i
- M; Z' H1 G' k6 G$ n6 u, Y 所以C#是为了.net服务的。 ; Q% T% N, N. R: m
$ D( _9 ?+ q! ?- D/ G
2 g2 j" E9 B6 u8 a0 N
此外我想我没有精力再搞个c#help.net了。:-P ! Q% r/ H7 H5 B) h! I3 [ 0 F0 \$ r6 J$ T, } 果子 来自 http:// : 4 t2 r7 J/ K4 B
6 v2 k6 Z) J9 d. N
"恶魔吹着笛子来"是比较“前卫”的一类程序员。我就听业界的人多次说过JAVA也是 ) N7 y' {3 w3 _& c- a' U' l7 Y% R
P0 ]% n+ |) Z$ L' N( v; T" ?
; i* g: C" d6 o* y7 z 个吹得很响的东西,但实际如何,大家都看得见。至于认为C/C++开发工具(VC, . n( q. c a3 G4 g* b
! o% ]# t% `( p BCB等)会在一两年内退出市场,就是无稽之谈了。 $ H/ k' @- x% o3 L * d, w# Q" X4 u3 Y0 S Wesley 来自 http:// : $ o8 _- d. v1 } Z. f6 Q 2 {/ R+ }, C& t- w% e 恶魔吹着笛子来,你的观点很有启发性。能不能写一篇或推荐一篇剖析、比较Java开 , d9 t& Y4 r% Q
发工具的文章?比如Visual J++, JBuilder,以及Symantec和IBM的对应工具。(可能和 ) H6 d9 d( e5 k$ F7 ^ z6 V本站的初衷有些不合^o^) ; N; z$ A$ b, \& D 8 T! |2 e/ O& ^' I; H LeoCN 来自 http:// : 2 F; x: e X6 `1 `% C
3 t" j3 e# }1 R- Q5 x It's not a time for us to determine which language will more better! 8 P1 G. k+ W% n9 Q2 g3 c
8 D3 r7 k" e: D, u9 C* @ in factly,In China,too many corporation just writting some codes for & s# |# I; x$ E4 a `( O. ^, G 5 u8 X: d# G8 V
enterprise's MIS,OA,ERP or other application.It do not need so speed 6 X S) p0 Z6 m) O3 s. v( F5 `% y& ] 0 a/ D! D# R1 k. c* @; \8 \
and do not need so good original code. just want more data,more easy and m + p3 p& \: t! N9 nore quickly. ; u5 ]2 R7 M5 d. y9 y 0 B" }; c5 v* l2 Y3 v) l; u( N4 p so c++ is not a choice in such enviroment. and u know,many codes we write 7 v B9 p$ X. j5 T( g I# ~today will be useless.and there r so many easy tools such as VB ! E1 r6 H9 _* b! m C- q
$ V) n' G" D9 e3 D. g
for windows designer, Developer/2000 or PB for database,Domino Designer fo 8 M) Y2 I* X' }, n# d9 Zr OA application,why c++??? , v1 u2 r$ j* l* @& u " Q v, u# T2 p in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. & K8 I" K7 L/ A) `: b* a1 \+ s: R % f0 T* n! Y9 [% F but now i hate c++, it has waste my time! my corporation do not need ! x* p/ Y: @/ G5 G" f- K9 F! e0 K % r4 x5 S/ G0 Z: o' a7 r+ l! y- | c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc : v( V2 E, D8 u7 k
. 2 q1 A& I- E2 R, g # `7 P7 @5 u5 b h so, a tool is just a tool,if the advantages in some aspect of the tool % j# J* m: q& G& l) a
. {3 x, u# m+ S: k2 Z [. e8 X% ]5 ~ u needed. it's will be a good tool for u. others it can bring u unfortunat 5 i9 J! P% c o5 K
ly! * E! h1 d1 I, o( z
* x, f7 g; b( W V v/ V
恶魔吹着笛子来 来自 : 3 X& w" j0 M' G5 j v9 ]
4 _0 n7 ~9 w$ L3 H/ ~* a 果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 ( P2 R& x, K, p: T- y z的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 ! G! J9 D9 B! k( X" L; w, z
java程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 % X9 j9 {% F: C
司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 % \9 c k3 |; d& G6 L) h! p s" o
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA ; q) J% e+ W9 }; {7 w8 ~
VA是什么样子.NET就是什么样子. ; K, b( |. O5 x
: {. L" L5 B6 W; ~; b! d7 a! w7 v
- D* n: S# r. @. \! Z) ~& D
. R: U0 t- |% M/ R6 E4 c; n/ q 恶魔吹着笛子来 来自 http:// : " l7 _2 d' z7 Z1 A) X! e9 f
# k1 K; o4 U" N4 W; Z
Wesley你好.关于Java开发工具的问题.从我的观点来看,目前的Java开发工具没有一个 ; O+ w# B* M7 g/ A' f, S8 S# H$ O令人满意的.最主要的是,在技术上考虑的太多,却不像MS的开发工具考虑到程序员的方便 : [. L* J. U2 p- t# t0 B2 I(vj++是另外一会事情我后面会讲). ) W: J! l8 ]$ i" _ & A% c. q& N7 i
基本上流行的是sun的jdk,ibm的visual age for jave,samtic 的visual cafe,和bor ) G6 s8 M3 ~6 n; o- Z7 M
land的jbuilder(vj++基本上没有什么人用). ( O8 X7 Y7 Z! x0 ^3 X % u$ L6 m7 `5 Q/ ^
在这几个工具来讲,jdk是老大哥,但是仅仅是一个command line compile.在某些方面 0 ^4 U4 b8 E/ @
用ultreditor+jdk会比较方便,譬如你的机器的配置比较的低(memory<64M).一般来说,几 8 r" H4 d Y. R乎所有的Java工具需要的机器配置都比较高. 8 `5 n+ k* M7 e$ ]* z 3 l& `% ~) r0 _8 E
visual cafe是第一个可以使用的Java IDE工具,我当初学习Java的时候就是用这个.它 ! ], c& [0 c; w
的配置要求比较低.一些比较低的版本譬如1.5 2.032M就可以使用了.但是现在最新的版 / y+ W0 C: D7 n- k+ @$ o9 G本5.0的要求就比较高了,可惜2.0以后的版本没有用过.cafe的IDE开发也不是很方便,懂 & k& h7 r) x; F# P; }, E一个窗口西一个窗口比较的乱.而且bug还很多.有的时候trace到一定的地方 + a' E5 y9 S4 _ ~0 [ . d# N. |4 G5 p! S
就会crash.samtic是一个系统安全公司不知道为什么cafe却那么不稳定.而且从技术上 - g ]4 V& G, f; l6 F9 H来说到目前为止还没有完全支持java2.更不要说j2ee了.从帮助来说cafe的帮助基本上还 ! g# j7 s6 ^; X3 A; L# W& l是jdk的帮助没有什么特别的地方. ! X3 z- i( [) L
J! }) l5 m ^ SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, A& e t5 o$ w0 w! P& l3 D3 v L* h+ y9 g N% \: i; J I
这和速度有关,当然也与MS对JAVA的态度有关。 " O) @7 T( _: z * }) r; f W4 `5 `: w: A j
! C, c4 D0 v( V% E 不过我一直认为C/C++不会因为JAVA的出现而消失。 % J: q( b) P( m & d1 g4 O+ ]$ C0 C/ {1 x
就象COBOL目前为止还在使用一样, 7 G6 d, V( ^+ ?" b
3 l% L5 j+ y2 p X ' F/ Q: Q9 z2 l2 i, f' v
不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 % s( H1 m6 k$ I; K) b# @& h( s* ^
是不得不承认的。 7 T6 Q- w- K# _" S4 e u 8 ~7 {7 o1 l; H" J
恶魔吹着笛子来 来自 http:// : 2 g0 z0 O7 \ i; A. A, i8 g 1 Z: T* D% |% F k2 [' ~+ @2 d1 ~* o
是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 " |1 Q: |; h. g& H5 { ; Y F# y$ ?: b c/c++的升级换代是在所难免的.对么. u3 H. i( x2 N5 n% ?
* R7 l8 @' p0 B 恶魔吹着笛子来 来自 http:// : 9 k$ u& M4 [3 s 7 M0 T. g- d! G+ R3 p
而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 % t X' Q8 h6 C.对不对. + g6 r" l3 N( G+ {; T
( I- e6 n3 @/ x xcc 来自 http:// : ( u; Y2 t4 x" f, R) \
" w- v: k8 @7 _& y
同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 / W& w" Z L3 \9 E0 I
; j4 q3 F# K# K& U2 s% e( _
NET and C# Questions with Jeffrey Richter $ Z! t& w8 ?( U G
' g7 O: u' [! d- @. @% i( J6 }$ M2 q3 R
In the weeks after Microsoft made a huge splash in the development communi ! a3 p3 X3 X0 F$ N; V2 W1 Oty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter # }+ x$ ?3 E8 m7 i$ M1 w7 G: Y accepted our request to field 20 questions from our readers about these new 6 _$ `; b- r- D8 ~6 A8 v( | technologies. As many of you already know, Jeffrey is a cofounder of Wintel ! v! [* G( \3 e6 B
lect, a company that specializes in Windows & Microsoft.Net training and deb 5 f4 s9 M" Z" `. a2 l* c
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET $ Z# D: p) |- V7 I/ H1 a. H. F$ U0 }
Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio + P# u& h# J$ t% q
ns operate. Below are the 20 most popular questions that were sent in and Je 0 v) y. }$ e9 M! E" ~ ~' ]* h$ Nffrey's responses. . |7 b, B$ {) U% b6 E% r
4 x- s( O3 _2 Z
For Visual C++ developers everywhere still trying to get a handle on all t . t0 U' K$ }: ^his: Thanks Jeff!! ) [8 P, @$ ]! V8 { / U( |3 K" {' f. M% x9 s
# |$ l0 O5 V2 B
Question #1 Is .NET a runtime service or a development platform? : r7 Q4 n! k1 X0 ~) a
* P$ e8 X, Z6 ]% ` Y2 Z2 P; n+ F) ~ Answer It's both and actually a lot more. Microsoft .NET is a company-wide 2 P n6 x$ Q/ \# h) I initiative. It includes a new way of delivering software and services to bu / C3 D: J* j& ]* c. nsinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The 3 l3 u' \3 x8 t: C! @4 d
frameworks is the first part of the MS.NET initiate to ship and it was given : Q3 F+ r7 z, ~. Z, c" P9 u0 Q" k% W9 ~ out to attendees at the PDC in July. The .NET frameworks consists of two pa - `; @+ f+ O( f" `* |/ T) }; H+ w* vrts: the .NET common language runtime and the .NET class library. These two n3 y$ C9 q' z5 w( n
components are packaged together into the .NET Frameworks SDK which will be 1 l/ P! }* p9 G- U' favailable for free download from Microsoft's MSDN web site later this month. / y$ k5 j K% D" [1 n6 a4 c In addition, the SDK also includes command-line compilers for C#, C++, JScr , j$ M9 V8 P9 J0 a# |* b2 Pipt, and VB. You use these compilers to build applications and components. T 1 t0 h- d- _7 R& {. {; B/ r* Q: whese components require the runtime to execute so this is a development plat 5 g$ N: _+ O/ t( y3 ^ e) X% oform. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e ; [/ D. D3 c. @: f* w) s0 e9 Gditor, wizards, tools, and a slew of other things. However, Visual Studio.NE 5 O" H& G! X( ^8 y$ x2 y: L# ET is NOT required to build .NET applications. 6 r# C4 {2 @7 r. U
: e# y- Q4 t' `# Q$ h4 R; @7 z + W0 m/ s5 m# Q; N
Question #2 How likely it is for C# to become a general-purpose (meaning: / c: ?; Y* m3 fnot MS-specific) language and if so, have any other vendors committed to pro # ]: N( }/ I. V) o; Xviding compilers on any non-Windows platforms? ( G; a$ _7 e8 @; u- H& X% P 8 Q- W' I/ Q$ [# Q Answer It's hard to answer this right now. I have been programming in C# a 2 p, _- t: }2 U4 g/ E
lmost exclusively for about the past year and I love it. It only took me a f " I. t |6 W+ o7 F* R
ew days to learn most of it since it is very similar to C++. It was designed 3 W% T! m0 Z- q; c2 m" }# l9 n
to compliment the common language runtime and I think that it's unlikely to + M, V8 b7 B9 {: P# r gain much momentum if decoupled from the runtime. However, you never know. + u+ r4 }' a* C" Z3 m ^5 o$ wMicrosoft is submitting C# to the ECMA standards body so any company will ea 7 ~, L; M: z2 ?, |sily be able to produce their own C# compiler however, without a runtime, th - _: y R3 _7 c, Y# ae compiler itself is not that useful. I'm not aware of any companies current 3 j7 ^; g8 _* R. N: N
ly working on their own C# compiler. Certainly, porting the runtime to anoth : N6 L/ I. @7 v/ W: g, t- t8 Ter OS is no small undertaking. ! d* R0 a" {3 X$ C O5 X D
2 u: r$ O& l0 i; P ! i) t( K; E1 q' J& i. N4 k2 b Question #3 Can you tell us specific practical problems that C# can fix be % ^/ T0 q( Q; L8 [8 \tter than Java? ( P- q6 q1 J4 p! G # N) o$ Z( }0 b4 N( _ Answer I must be honest with you: I have never programmed in Java. I know 6 ~% s3 i) X5 q; c6 C5 P3 I$ [what C# offers the C/C++ programmer: simpler syntax, components that seamles / i* r' S$ i, Y2 {
sly fit together, type safety, and so on. Other people should be able to add / w: j: l4 x' K: Q! Kress the C# <-> Java comparison. + V5 r. b" w% U9 V2 c4 \ ) W0 D) h' a3 C+ R) Z, s
$ [' W6 I' ], w6 s! a
Question #4 Will ADO+ be the preferred and most efficient method to access & G6 \- \5 N) o databases from C# or will it have it own (or .NET) class wrappers for the O * Z% V) f! Y; L4 ZLEDB API? + V9 H$ G( W( }3 e" O2 F ( X; z/ n" @4 D1 K' b- U+ ~4 B Answer The .NET class library includes a System.Data namespace with many t ) u% G( A3 ?' e3 \8 X' H& @ypes for database access. These wrappers will be the best (and most efficien 1 G2 c5 {( K8 T4 `3 ^t) way for a C# programmer to access data. 5 U& X8 A! m5 ~$ R 1 W7 A3 }2 w4 I0 I& `. t1 Z/ b
2 }3 s, z p A8 ^, Q i* X Question #5 Can C# be used to develop Windows applications or is it soley : Q: u; N2 P( J6 u* R+ Dused for developing distributed applications? 2 s! t8 X- u2 N/ l1 H8 U/ n: `
/ J) z2 }7 W" @* q' \( X Answer C# can absolutely be used to develop classic-style Windows applicat o" Z# f9 c6 p5 oions. Actually, this is more a function of the runtime, not the language. So , M3 q& [6 T1 D5 t/ ~$ t+ D5 `
, the runtime supports console apps, GUI applications, NT Service applicatio $ l. e! e9 x' e5 O( n) kns, simple components which can be used in applications, web pages and so on 4 f! F+ X. S+ j2 s( v6 q( A
. You can't write a device driver but that's about all I can think of that t U7 V+ m6 t X. G6 M# t- X' Qhe runtime doesn't support. 3 _7 _" _$ h* E- N3 ] . Y% |" C) G u3 Z; ?% p
" l6 A9 D0 C7 _+ `+ c Question #6 What is the C# relationship to WinForms? , L" Q" h5 h6 v/ s% {" ]" [
$ \, O g0 [$ `6 Y) Y$ ^7 L
Answer Win Forms is a set of classes in the .NET class library that wrap W * F: w1 P6 e$ a$ T; qin32 windows, brushes, pens, etc. Any language targeting the runtime (includ * b7 x. [" W$ ]# H" v
ing C#) can construct instances of these types and manipulate them. This is 5 L+ J* j7 S* y. M& f
how you would create an app like Notepad, Calc, or Wordpad. I know that Win 6 B }- q- }3 o: J+ f3 J. ~Forms has similarity to J++'s WFC library but I also know that there have be 4 Q) ^. o7 d8 C j7 S' ?% Wen some major changes. @! P: F) W: O6 p ! k* \5 s* Z6 C. p
" x2 h' S, q- W6 L: V
Question #7 Rumor has it that the C# language has been submitted to the EC " `" U4 |; B/ xMA for ratification. Is this true and what impact do you see that having on 9 Y3 D( }+ f2 q' p M( R+ Hother companies adopting it as a general language (such as C and C++)? " q- S7 w1 B' {% h* |. k4 X
! h/ Q6 @7 p1 `6 Y p
Answer Yes, it is true. I pretty much answered this in question 2. % y' S+ x" q4 t) D4 x; J - S$ D- w5 {9 r u v
" x$ q! D. `. E5 b* k Question #8 Which will be the role of ATL and COM in the new .NET technolo ' O5 ~6 Z* m* Ugies? 6 ?( ]+ y& E. b) a
- [* V% p) _' R
Answer The .NET frameworks offers a replacement for many existing librarie " e2 \4 v8 d! X0 J! Os, like ATL, MFC, C runtime library, standard template library and so on. .N - C+ v# f) T4 @3 AET programming is significantly easier than using any of these older technol 5 Y5 l: Q0 {3 M# v3 W
ogies. For this reason, I suspect many developers will move away from using . V8 A0 C' v$ S8 y' g! I* ^3 ethe older technologies. The older technologies can buy you performance howev q' O2 `# O. C! J
er; so, some people that are very concerned about this will stick with what' # s1 h) ]4 U8 T+ z9 q# R# n, |
s around. As for COM, developing components with .NET is orders of magnitude % z' S$ x1 w# x6 @5 K easier and the interoperation between components pretty much happens for fr : {8 l' f' s7 N0 C- }ee. Again performance may be an issue for some. And, for the time being COM+ ) b' ?) `/ _+ f9 P3 ^ services, like transactions, are not being offered directly to .NET code. Y 9 d3 E* o$ H: S3 D" H- y
ou can still access these COM+ services but .NET code must incur an interope 6 b/ m5 R; ~9 B
rability transition, which translates to a performance hit. + h) O! C% \; E2 N: T* y
2 P% H \9 B+ O / Y* P% m O8 F" d Question #9 Why was the templates feature not carried over from C++ to C#? 0 J \4 _2 y% y* k, Z
3 e! n- [; S% l3 O
) C- j( c" N" d, R Answer Again, this is more of a runtime issue than a C# issue. First, temp ! Y( a0 u/ M0 @" j" R ilates are difficult to implement and Microsoft choose not to do the work for 3 K6 ?! n) F7 H3 a$ q% }1 |" c4 W/ v Version 1 of the product. They may do templates or something similar in fut - M$ c# }$ j: @ N( D3 Q+ N: a
ure versions. Second, since the runtime is a multi-language runtime, introdu ! @0 X5 E P! [ h( s8 k! Q5 f! s% rcing templates means that all languages targeting the runtime would be requi ' b2 |& Q+ l* N Z7 b) ~red to support templates in some form. There are a lot of issues here that n * j9 Z9 j) l$ P6 a/ T/ V, Aeed to be carefully considered. + A% l9 j# A; ]3 h; F4 e1 O * E( ~) W. t" {
* C! Q/ _" }5 p7 k' V% F" }/ _6 b5 d Question #10 Will C# replace the pseudo keywords that clutter ATL COM code 2 z% h+ z7 ^- g, I( Y8 r# B$ m% d with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX 3 e& |, o& V0 c5 g" @! M1 [8 a( K7 }
XXX. 3 C; \# r* |' r, I2 K" E) U; u
% J- G$ P, o, h% K0 b; Y# ]# O) p
Answer Absolutely, all types have new names as provided by the .NET class & j9 I F7 { w% Flibrary. / l) u" X0 K8 K! Q- w
; C8 k9 B4 T! p! A- A' M
$ H J |1 b+ ]+ c3 P* b9 u1 j/ y Question #11 We've seen managed extensions, but aside from that, what futu ) U+ {; E; ^1 a p1 }; x0 \; B+ Bre does C++ have at MS and in .NET? ( @. x, M4 f7 g" |" T# |" A) G
0 a% L) {. A3 ]6 w! X& t8 b Answer C++ is unique in that it is the only Microsoft language that allows ' V& }# z& W* j1 m9 o7 z the developer to write managed and unmanaged code. So, I can easily see dev $ n; A. e6 @% }( c% e% S& ]& _elopers writing in unmanaged C++ for performance-critical algorithms and the 7 }& A0 V* U1 p. b! x0 s& Q+ dn using managed C++ for type-safety and component interoperability. I'm sure 8 ]" m5 Z) C# T$ ?5 z* Q( U+ X Microsoft will keep C++ going for years to come: device drivers need it, Wi ) n" ?" b7 W+ C; o5 Jndows is built with it, SQL Server< Exchange, and other BackOffice products 4 w$ v3 \. u ?5 ]
will probably use C++ for a long, long time. 1 \6 t5 W% B$ o5 ?9 D3 v 0 u% k8 C& ]6 S, I' Z
1 z1 S+ [) ^5 `0 [9 T/ Y, _# a
Question #12 If .NET supports ActiveX/COM, how will security be assured if 8 V6 X) p' J) J- N- k: k* v( Z* t. [
a C# application runs from within a browser? , f& N5 d/ K9 V/ \2 @ 3 h; ~, `6 I' @' q' @% J: y Answer The .NET runtime offers code access security, which allows an admin 6 h0 x3 d1 Y! _4 }8 q5 ~& I- Oistrator/user to configure security based on code identify. By default, any $ F- g6 G2 d K
code downloaded via the Internet or intranet is untrusted and will not be ab " v' Q: t7 t9 Cle to access files and other resources. In fact, when I build a console appl 9 `( ~- h1 ]6 V: t" j; Vication and run it from a network share, I get an exception when it tries to , Z" n: A! |* B" B: i, r: r
access certain resources. If I copy the same file to a local disk directory ' h m3 \( d# s- ]9 a9 X% @ and run it, it runs fine. Code access security is integrated with the runti / G, T5 ?9 d8 z7 P% V" \5 [
me and is too deep a subject to cover here. $ m" |* D7 h. p' n+ f: a 1 u& Z1 \+ E. Q, n; {) a 3 r' J% V! K) Z Question #13 With regards to the .NET runtime, do I need it on the machine / B; X- u+ t1 r3 b that I deploy C# apps on? & g8 s' u0 I) c0 O4 W& L. s7 |& L" I
% V, g) q1 j/ l Answer Yes. All managed apps need a manager; the runtime is the manager. M ! w' G' v# S3 V, d# ~( F
icrosoft will eventually package the runtime so that it is freely redistribu - y, W P- i8 q! i2 |
ted. For now, end-users will have to install the full .NET SDK from MSDN web ! H4 |7 ~1 n* x9 |1 V, T) r site (when available). This is similar to how VB developer must ship the VB 4 }2 x- B1 U8 @8 _' B
runtime today. % Q) Z: v- Q- m: c( }
# n# A( X( |( k' U, y
- @( L" c4 N; n9 |- K8 p8 N. \) V
Question #14 There has been mention of being able to derive C# classes fro 1 D/ w8 t' B( b# g: l; am VB classes. Is this true and where can we see an example of how to do this 7 K! a" w$ z( n? . w' e& T/ G0 B* r, q 9 q% G* S v: ?' r9 l1 |3 L f Answer This is true. In fact, any language that targets the runtime can de - i/ B6 h4 f/ e7 w" n, _2 ?, ~( B5 e" \
rive from any type created in another language. Also, the Visual Studio debu / P& v, s% W5 l
gger fully supports debugging across languages. Each entry in the call stack 0 a0 P+ I. ]+ t/ U5 k* o8 U9 o window shows the function on the stack and the language that the function w x/ Z7 q( ^' P N: R' @2 {as written in. This is very cool and got a round of spontaneous applause whe % p- Q" e$ f9 o
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t 2 y) L7 u, k, p0 l ]7 }
o do this. It's really quite simple. Actually it just happens, there is noth 2 ^% u( q( R6 E# Y! v" Ving for you to do. You can also throw exception across language boundaries a ! Y# V5 z+ {, `( cs well for error handling. + V$ |: d8 c# |4 k& X4 r( R ' k# u1 ]$ Z1 F+ [3 _- Z( o 9 B1 D( }! Z; W9 s4 L y7 R: l. E+ m Question #15 Can I derive a C# class from a C++ class? If so, how? 4 c2 {2 k. o( L7 t
! r4 ]% c$ T1 G Answer Same as the answer above: Any managed language can inherit from a t # D2 e( x( i( i( H8 U$ |ype in another other managed language. If you use native C++, then you can't 6 x3 w6 l0 |' s6 s
do this, however. 3 I1 Y. W2 d9 u : Q% }( ~- h3 L: {, p5 i* N u; e ; p6 B3 h, W: ]% H4 P
Question #16 Will the new version of MFC have the option of working in a m " G3 w# g( Y5 N1 E8 L- Oanaged environment? 4 W. F. Z+ z9 O- l( Z8 J
! F! i' O. q. w! Z; w* L Answer I haven't been tracking the new version of MFC but I'm pretty sure + A/ N0 n% g6 _: K9 f% o4 G5 o0 uthe answer is no. MFC is all unmanaged just like it has always been. For man ; m. e! h$ Y( a" _aged applications, Win Forms is the window manager that people should use. ) T2 R# O$ s2 u% O6 E
0 Z' t1 r+ n3 i. n; X & j1 w: Y. {& o- r# M" ^/ e
Question #17 If the new version of MFC will operate in a managed environme ; W6 H5 ]. N; \( ~
nt, will it have the option of building desktop Win32 apps and not needing . 9 I2 v/ h+ L7 Z' E( E* aNET runtime support? ! _7 s M0 @" [% A2 x# W. I* ` 1 d, X5 _ G8 d8 G# u, ]3 ~
Answer I'm pretty sure MFC is unmanaged and will never require the runtime 4 P. g. P3 h( Q8 s; O7 Q
. . o, X- ?+ X) G1 b) u2 F" c ; \5 T5 b; x( N: |7 ]% r 9 ^0 }& b1 p1 {, Q6 C
Question #18 Stroustrup has been quoted as saying "I have not expressed a 3 p7 W. b9 x! j. j& N3 Q$ p
technical opinion on C#, and I don't plan to do so. C# is yet another propri 1 ?' s* K' X9 c' H8 zetary language specialized for Microsoft's Windows system." Do you agree or % H5 `( a6 L* C) R8 odo you think C# is more of a generic language open to other platforms? % U# J) A+ `8 C. l ; L, I+ @) @$ Q
Answer C# is a language designed for the common language runtime; not Wind 8 Y9 R6 v' \, S) pows. The CLR can be ported to other operating system like Linux and Solaris 4 C; Q+ ?* ~( L8 ^0 N! S% X F) J
and if the CLR is there, then C# will probably be there as well. In the gran 0 t, m: p! Q* S( ?1 i7 j/ J1 zd scheme of things, C# is not that important or interesting. It is a syntax $ Q0 N, w! Q1 c. \
checker that spits out intermediate language consumable by the runtime. You ( ]9 V, o# o7 ?3 T3 v' d1 V2 y$ Gcan love C# or hate C# - your choice. I happen to love it and think is the b 4 ^7 q9 l. ]2 Z, w) \
est programming language for the types of applications I write. # a5 V2 ~" A8 {# ~$ U$ L ) T M# B+ F4 Y# [& Z! B7 D
5 U' Z8 N" C0 ^! u0 I, y Question #19 I heard a rumor that VB7 will allow static linking of the run 2 w1 O9 G4 w) d( L5 ftime, like MFC. Is there any truth in this? If so, will C# also be able to c 7 w6 t4 T7 N0 M( ~* qreate standalone apps? " B: H+ h& D' Y+ k8 D6 h " `7 B- h( i5 p% d! X9 K9 P6 C+ Y Answer This is absolutely not true. No language will able to statically li 3 L. r. T( _- Q, Mnk to the runtime. 9 p8 Z9 f, q' S* L$ k6 Q. q
0 i: a# \+ D: }+ h- A " z9 J1 Q) Y" }# W& [! j: S
Question #20 Does C# still use resource files? If not, what mechanism is p + O8 C, N3 ~2 }, C' T: ?rovided to allow for localization? & }, L0 \5 U% Q. u 0 `5 X) L2 I ?
Answer The .NET frameworks designers have created a new resource model. Re 1 ^6 ]' w- S+ \5 @+ t6 R
sources can be embedded in EXE or DLL files the way Win32 resources are or r 3 R( c3 M2 U E& i3 vesources files can now be stand-alone files like a single jpg or bmp file. T 7 B/ ]; d ]/ S0 j7 v" rhere is also the concept of fall-back cultures. If the Swiss German resource ! u x( S; R7 @5 x) ]" ~
can't be found, the runtime looks for the German resource. If the German re * @+ p- p# u: W0 `source can't be fond, it looks for the "default" resource. Each language wil 1 i9 E8 X4 k. e$ K$ H9 M$ Q4 o
l typically be built and shipped as a separate assembly rather than packagin # L3 }2 H5 ^( V+ h. A! E9 w& O, ]! E
g everything up into a single file. Like code access security, a full discus + F- S9 m2 r9 m& z* F5 X; ~
sion of the new resource model is too much to put here. ; C2 g+ K, _ Q% r
" F7 b* U9 Y' y6 q: @ ) q6 t' \: R' i; ?2 @/ H6 w
$ b; S% g4 I, {5 b" u* x& N
2 {$ K6 i: B% F wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : # v5 Y7 p: i( X( W+ P+ r/ N
& S2 Z: ?7 d# T6 V
我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 8 y4 L& w5 a" S前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) & B( W$ ~& l0 O9 ~2 C. r2 ^5 B$ p8 r 2 m4 Z/ k3 I. i9 s, ^7 F1 ^ 但没有一中语言是十全十美的, ' y/ R/ Q. o% R; k9 P
7 d3 D F& Y4 Y9 ^2 h; y: c3 c JAVA,C#都不是。 + J$ B# b* z/ ^* \" B3 t
5 Q+ d1 k2 M# i
6 j6 A$ r o" O) v1 r# F9 r
6 M% T) I' s' O* P' d/ S: g
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : ; m0 j, u/ O" N4 Z( h' K $ F' ?; U) n1 S/ H! g2 o: O 》》恶魔吹着笛子来 0 ^0 }8 }, ~$ m# d
2 F ]: A# ^* P. w. W" U5 f$ ]( K
你好, ' V/ P5 K: H" H- o& L |# b. _* C0 [
很高兴能够与你进行讨论, 5 k. e% j! [1 I K' G+ P7 J+ b! \
' S* h, B4 |0 w+ Q' g% w) _
虽然本站名字叫做vchelp.net 1 M3 @/ Y d1 s8 @5 y2 _
8 q- j9 U; r( W; e5 B6 y$ P
但我不排斥其他的开发语言,只是自己的能力有限不能将本站内容扩展到其他的语言 1 x, w8 `3 u5 Q0 W2 O8 Y/ S
, ) {1 d) J% m+ V! f p4 |1 T* [ % b5 ^/ E! i* U. M# b Q6 W. M4 f 但我很希望大家在本站对开发中可能遇到的问题和矛盾进行讨论,不论是关于语言还 6 Z: q! I6 u! I6 ~ Z7 q6 w+ I
是开发方法的。 + G. [( l' H* p5 _& O; G , P1 F4 b, A5 y* {% U% C
我想邀请你成为本站个人专栏的作者, . m1 q# g7 j4 H" p# l 3 ?9 Z0 L. a. W, V: H 你可以发表一些你关于开发的想法,就算是与VC无关也没关系。当然在时间上也没有 4 g8 h# a+ s7 K. H
要求,你有时间就写写。 1 q4 R5 f. \# D+ D2 e2 P
* u2 X- L8 E' R' C8 B6 O9 {
盼复:<a href="mailtwyy_cq@21cn.com" target="_blank" >wyy_cq@21cn.com</A> ' D8 a7 O' j' e- q( l, }, m$ M