|
From: Teodorescu C. <te...@xt...> - 2002-07-02 07:30:58
|
Ioannis Vranos wrote:
>>-----Original Message-----
>>From: dev...@li...
>>[mailto:dev...@li...] On Behalf Of Rob
>>Sent: Tuesday, July 02, 2002 3:11 AM
>>To: dev...@li...
>>Subject: Re: [Dev-C++] C#
>>
>>
>>C++ is definitely a strong choice for programming students.
>>The two main
>>reasons I've seen professors offer on its behalf are that it's a
>>language that the students will actually find useful "in the
>>real world"
>>and that students who gain a solid foundation in C++ seem to be more
>>capable of handling a wide variety of challenges later in their course
>>of study.
>>
>>Since we've been talking about .NET during this thread as
>>well, I think
>>it's interesting to point out that out of all the components
>>of the new
>>M$ Visual Studio .NET, C++ is the only language you can use
>>within that
>>system to compile programs that will run on computers that do not have
>>.NET installed. This places a serious limitation on C#, VB,
>>and all the
>>other components. (I get the impression they didn't think many C++
>>developers would buy it with the .NET limitation.)
>>
>>
>
>According to IDC Developer's report for 2001 C++ is the dominant general
>purpose programming language with about 2.6 million developers
>worldwide. Second was VB with about (if i recall correctly) 1.4 million
>developers, and then were other languages like Java etc. They know that
>C++ is the most popular.
>
>After all they claim that Windows are written with their Visual C++.
>
>
>Mainly they advertise C# much because i think they want to lure Java
>developers and if possible why not VB developers. C# can be used by C++
>coders for normal applications and probably be learned by them in 1-2
>days. I have seen this happening with me learning advanced Pascal in 2
>days after learning C (The {$i+}, {$i-} etc stuff). But i hate Pascal.
>:)
>
>
>After learning single and multiple inheritance in C++ how difficult it
>can be to learn using single inheritance only that is being used by C#?
>Another stupid thing i recall from C# is the use of goto inside a switch
>statement.
>
>
Bad and good
Bad becuse they called goto.
Good beacuse it help you to define a way a good one in a switch
sometimes i have to write smth like
switch (x){
case 1 : code_1 ;break
case 2 : code_2 ;break
case 3 : code3+code 1:break
case 4 : code 4+code 2:break
default : break;
};
so in C# :
switch (x){
case 1 :code_1;
case 2 : code_2;
case 3 : code 3 goto 1;
case 4 : code_4 goto 2;
};
more simple :-)
>
>It was something like:
>
>switch(x)
>{
> case 1:
> x=2;
> goto 3;
> case 3:
> y=4;
>
> case 5:
> z=6;
>
> default: // something
>
>}
>
>
>As i said something *like* that.
>
>
>So if you want to do the same job for some range of values you have to
>use gotos!
>
>e.g. in C++ you would do:
>
>switch(x)
>{
> case 1:
> case 2:
> case 3:
> cout<<"Get lost loser!\n";
> break;
>// ...
>}
>
>
>in C# you have to do sonething like:
>
>switch(x)
>{
> case 1: goto case 3;
> case 2: goto case 3;
> case 3: something_java_like.writeconsole_something("Get lost
>loser!\n");
>// ...
>}
>
>
>Ioannis
>
>* Ioannis Vranos
>* Programming pages: http://www.noicys.cjb.net
>* Alternative URL: http://run.to/noicys
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|