I had just started to finally self teach myself C++.NET, but decided to teach myself Visual C++ so I get the idea and move onto .NET. But from a well-respected computer programmer, who's also my brother, says that you shouldn't bother with C++.NET as it wasn't
made to be managed, that C# was. He raised good points on the easier methods with C#, but then, he didn't for C++. He sort of raised the notion that C++.NET was a useless language, and that performance wise, it wasn't worth it. Visual C++ code executes much
faster than CLR code, but I guess if Visual C++ was really fast, then that same fastness would be ported to the CLR with only minor defiencies. (because of JITing) Should I move to C# or try C++.NET First?
well, I think there'd be less of a learning curve with C# - and you can transfer a lot of knowledge from one to the other, so C# first and then C++, or perhaps look at both in tandem.
RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadable
What do you mean by learning curve? C# was based on C++, they are very similar languages, and to be honest, I prefer C++, as C# has a Java feel to it and I dont like Java. Is there anything you can say on the performance side?
by learning curve I mean that in general C++ is a more complex language and would take longer to get up to speed with. though if you don't like the java-style C# then that nullifies that argument.
RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadable
C# was not based on C++. It was based on Java like the second part of your sentance alluded too. C# was designed to be a totally object oriented language, where as C++ is only qausi-object oriented.
C++ still has classes doesnt it? Aren't inheritance & interfaces in C++? Object references can be used, with pointers and such, I'm afraid I have to disagree with that sentence saying C++ is a quasi-oo language. Java was based on C++, and if C# was based on
Java then originally C# is based on C++ too. And also, C# uses the "using" keyword in C++, instead of the "import" keyword in Java, C# allows for pointers and manual memory management in unsafe code, unlike Java. Java doesnt have any function pointers (as
in C++) or delegates that are in C#. Java neither has operator overloading or multi-dimensional arrays in C# or C++. I see C# as a successor of C++.
it is a qauasi-oo language. are there still primitives, can you access stuff in memory, is there a namespace heirarcy. C++ is a qauasi-oo lanaguage, if you refuse to see it I am never going to convince you of anything else. Also you are totally wrong C# is
the successor of Java, and Java is a successor of C, just as C++ is a successor of C. Get your history straight before comming on here and saying something totoally untrue. Also any language that uses primitives is only qauasi-oo, because a primitive is not
an object.
Java: the successor to C? I think you have to get your history right... The original creator and implementor of Java, first started to use C++, but was fed up with the complexity, so he made a language that dispensed with the features of C++ that he was having
trouble with. I dont think Java was never meant to succeed any language. Also, maybe C++ isn't a purely, true, bit-to bit OO language, but then, it is the most widely used, most popular cross-independant platform language ever. C++ can be procedural based,
or object oriented, I guess its how you see it and use it.
Back to your original question. I think C++.NET is probably particularly suited to programmers who already know and love C++ and to porting existing C++ code into the .NET world. There is a lot of that C++ code around so that's very useful. (There's an article
about porting a gaming engine to .NET (very quickly) in MSDN magazine.) If you're starting afresh it depends on what programs you intend to create. I suggest though you think seriously about a "modern .NET" language ahead of C++. (As to what is OO I've seen
people use a variety of definitions. I'd suggest there are different degrees and types of OOness. Remember some of the features, and some refactorings, end up making coding more complex and harder for infrequent programmers to read. You might want to achieve
that you might not!)
You raise a good point mr Gale and many others, but what I'd really like to know is your opinion if C++.NET code would execute faster than true CLR C# code? C++.NET simply uses the /clr option on the compiler, so would that slow down the code exeution normally
without the /clr option? The JIT compiling on JScript.NET isnt very quick, mainly because the compiler was made truely of C# managed code. C++ is mainly unmanaged, so code execution would still be fast right?
decpersona
Member
310 Points
62 Posts
C++.NET performance against C#
May 04, 2004 01:28 AM|LINK
Atrax
All-Star
18705 Points
3733 Posts
Re: C++.NET performance against C#
May 04, 2004 03:40 AM|LINK
Jason Brown - MVP, IIS
decpersona
Member
310 Points
62 Posts
Re: C++.NET performance against C#
May 04, 2004 05:13 AM|LINK
Atrax
All-Star
18705 Points
3733 Posts
Re: C++.NET performance against C#
May 04, 2004 05:55 AM|LINK
Jason Brown - MVP, IIS
nberardi
Star
11233 Points
2352 Posts
Re: C++.NET performance against C#
May 04, 2004 01:10 PM|LINK
decpersona
Member
310 Points
62 Posts
Re: C++.NET performance against C#
May 05, 2004 01:26 AM|LINK
nberardi
Star
11233 Points
2352 Posts
Re: C++.NET performance against C#
May 06, 2004 01:30 PM|LINK
decpersona
Member
310 Points
62 Posts
Re: C++.NET performance against C#
May 07, 2004 12:59 AM|LINK
MikeGale
Member
235 Points
81 Posts
Re: C++.NET performance against C#
May 10, 2004 12:44 AM|LINK
decpersona
Member
310 Points
62 Posts
Re: C++.NET performance against C#
May 10, 2004 01:19 AM|LINK