Author Topic: OT: c++ vs C#
ArcadiaAzazel 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
Ok, I've been programming in VB since version 1 on win 3.0, as well as compiled basic and quick basic under DOS, not to mention a lot of more obsure things prior to that (ADA, RPG, 3x Assembler, etc)

I'm looking to improve myself some here and am trying to decide the direction to go. I know it's going to be C-based, has to be.

What I'm trying to figure out is the basic differences between C++ and C#, pro's, cons, etc.

The company I work for already bought me VS 2003, and since it already includes c++ and c# I figured I might as well try and learn something since I had it.

I could read articles until I'm blue in the face but I figured I'd try and ask some people who had experience in the area that I recognize first.

 

-----signature-----
Link to this post
ArcadiaAzazel 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
After reading this article:
http://eureka3d.com/blog/?p=9

I'm think I'm leaning more towards C#.

Most of my applications now are database driven, with some eCommerce but not much.

I guess I'm mainly looking towards the future of things.

 

-----signature-----
Link to this post
Sif_al_Taak 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
C# is Java like without a VM. I know this simplify the thread a bit, but its true...

So if you learn C# you will be able to write Java stuff in a wink also...


I advise C# over C++.

Background: Im coding since 22 years in Assembler, Basic, Pascal, C, C++, C# and Java (J2EE).
And in C# and Java you got the best success to keep your code smooth and clearly (maintenance aspects).

 

-----signature-----
Link to this post
Drakier 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
Actually...
C# is interpreted through the .NET Runtime which is very very similar to the Java VM.

so you're not getting away from that in C#.

Most "companies" still use C++ because of it's ability to compile native code without requiring a lot of additional setup/runtimes.

Most "industrial" apps will continue to be C++ for some time to come.

.NET is the growing trend and it REALLY depends on which industry you're in, and where the company/industry is headed.

You just can't get away from C++ still these days, so it's definitely good to know.

As for the problem, C++ is a LOT more complex than C#. C# is very simple, easy to understand, and not overly complicated, but yet still very powerful. I personally LOVE C#. I use C++ when I have to, but I perfer C#. It's a lot faster to code in, it's easier to debug, and it just flows better. But I can't get away from C++ no matter how hard I try.

If you're learning for "fun" then C# is a lot more fun. C++ is nothing but headache after headache. *shrug*

hope that answers your question.

 

-----signature-----
Link to this post
Yula_the_Mighty 
Title: Lore Master
Posts: 6,054
Registered: Jan 25, '04
Extended Info (if available)
Real Post Cnt: 5,866
User ID: 887,035
Subject: OT: c++ vs C#
I tend to agree with Drakier here. I do not see C++ going away anything soon. It is a pain to code in. Much more complex than C# or Java. It has the wonderful ability to be complied into a tight fast native app that needs nothing else. It is used heavily here for apps that have to run or Intel and Arm chips.

We do not use C# because we need the ease of portability between Windows, Solaris Unix and Linux. Instead we use Java. We also do not want the fun of being hacked by people familar with Microsoft operating systems, etc. Something to be said for using a modified Linux kernel and a special Java VM. Hopefully hackers will go somewhere else because they either have to experience from working in the industy or spend a lot of time just figuring everything out.

 

-----signature-----
(none)
Link to this post
ArcadiaAzazel 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
heh, I've noticed as the years go by the learning curve get's steeper and steeper ... lol


I know after way to many years of programing in languages such as RPG, RPG II, System 3x BASIC, and other sequential programming languages, moving to procedureal was rough. Then came OOP and that was a nightmare ... lol

I think my best route would be to work on C#, and then pick up some C++ after I get a grip on C#...

 

-----signature-----
Link to this post
MT_Gouru 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
C++ is not going away. But I think C# is a better 'starter' language.

One correction. C# is not interpreted through a VM like Java is. Rather, code is JIT compiled to optimized native code at run time.

http://msdn.microsoft.com/msdnmag/issues/05/05/JITCompiler

 

-----signature-----
Link to this post
Drakier 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
the point I was trying to make with the C# code being interpreted is that it's not native code. Requires the runtime to load, and almost all .NET languages compile to an IL which is then ran through the ... "VM" for lack of a better word at this time for me...

It can also be easily disassembled because of it's "interpreted" nature.

Java's VM and the .NET Runtime although not directly comparable are similar. I guess I was more talking about the general idea than actual practice though. The code does have to run through an intermediary, whatever you want to call it... VM, runtime, *shrug*

 

-----signature-----
Link to this post
MT_Gouru 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: OT: c++ vs C#
The point is C# code DOESN'T run through an intermediary. It is compiled and run as optimized native code. Yes, the delivery is IL, no the IL is not interpreted. The article I linked gives more information on 'when' the compilation happens. Compilation and Interpretation are quite different processes.

 

-----signature-----
Link to this post

Valid XHTML 1.0 Transitional Powered by PHP