|
From: Ioannis V. <no...@ho...> - 2002-07-01 16:25:25
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Ramana Kumar > Sent: Monday, July 01, 2002 3:00 PM > To: C++ > Subject: [Dev-C++] C# > > > I'm sure we can all feel it's presence. > And i feel it also oozes Microsoft's presence too. > > anyway... i know this is the dev-c++ mailing list, and i love > dev-c++, but > since you are all supposedly c++ programmers like me, could > someone please > explain to me what is c#? I've read a lot of stuff about it > tonight on the > internet, so i know a bit about it. > are any of you learning it? > who should learn it? > what's it really for? > is c++ still going to be as widely used? > or am i way off track in asking that? > i know there is a free c# compiler somewhere (haven't looked > into that yet > though), as well as obviously the micro$oft visual c#... is bloodshed > considering starting a c# editor/compiler? > does anyone know much about .NET? it seems i might have to > get a bit more of > an understanding of .NET because information on c# assumes > you know what > .NET is all about. > the whole .NET and c# thing looks great for all the benefits > people are > raving about, but the first thing i felt when i saw so many > c# books in a > bookstore and not enough c++ ones is a bit of fear that my > native language > is being overridden lol - not exactly a legitimate fear, but hey > so anyway, any information on c# would be appreciated > thanks Lets start by explaining what .NET is. .NET is a framework which has a Just In-Time Compiler like Java Virtual Machine named Common Language Runtime. When you create programs and compile them, they are "compiled" to some intermediate bytecode called "Intermediate Language". When you execute the program, the program is compiled at run time by the CLR engine and then it is executed. The main difference with JVM, is that JVM supports only Java while CLR is open to support any language (and so different languages can interoperate). .NET provides an API for the CLR which the various languages can use so as to write programs, and interoperate with one another. C# is a C-style language (which is another matter of discussion how much C-style is, it resembles Pascal too) which is restricted entirely to the abilities of the CLR. The ideal in programming is to write portable efficient code with the system dependencies encapsulated in a small portion of the code only. In the view of .NET, if you want to make your code able to be used by other .NET languages, you can create a .NET interface to it. The question if C++ is going to be widely used now that C# has arrived is a joke, not because of language fanatism but of reality. C# is not a system programming language. You can not write an Operating System with it, it is a simple language among others in the .NET world. You cannot do advanced tasks with it. .NET, the entire Visual Studio 7 (including the C# compiler), 6 etc, MS Office, Internet Explorer, Netscape, Microsoft Windows, Virtual Java Machine, etc are *ALL WRITTEN IN C++*. This is natural, it could not be done another way. You can write a C# compiler with C++ but you can't write a C++ compiler with C#. This is because C# and C++ design aims are different. C++ is made with a bias for systems programming (to write OSes etc) with design aims for writing programs with the maximum space/time efficiency possible, while C# design aims is to write simple applications. Also C# is not a normally standardised language, so you cannot find compiler for it at every system (from water machines to large mainframes). On the other hand C++ is openly standardised and you can find a compiler of it *everywhere*, and this will be happening also in the future (consider for example HTML, etc and other open standards, they will be always supported). C# also supports only Object Oriented programming and this not completely (it doesn't support multiple inheritance etc). If you want to write a hello world program in C# you have to create a class. This is the truth, i am not a language fanatic and probably i 'll learn C# in the future too (which will be very easy after C++, since their abilities are a subset) as also Java etc. There is much hype around C# because MS wants to lock in programmers. The same happens for SUN's Java, Borland's Delphi and other non-standardised languages. Read the following interesting article about silver bullets (the above languages are advertised as panaceas): http://www.itworld.com/AppDev/710/lw-02-stroustrup/ Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |