Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which is easier - C# or C++?

Status
Not open for further replies.

phinoppix

Programmer
Jul 24, 2002
437
US
Hi all,

I'm a VB guy and planning to migrate to C# or C++. Which is easier? Applications I do are mostly db apps using MS SQL and Firebird.

I've read a few articles about these langs and it seems C# is close to what I need, but I would like to hear others' opinion/insights/experience. Your posts will be greatly appreciated.

Thanks

Aries [peace]
 
Hi,

I used c++ before but I think c++ is more tougher than c#. I am using c# now...and I discover that the syntax in c# quite similar to java and vb. So I think c# is easier to pick up than c++.

 
As a member of the "I migrated from VB6 to C# and all I got was this lousy T-Shirt" club, I would have to agree that C# is probably your easiest transition.

I highly recommend it.
 
C# is way better than C++ because you don't have to worry (as much) about memory management.

In C++, you always have to remember who instantiated an object, and make sure it gets freed, otherwise you'll have memory leaks.

In C#, objects get automatically freed when they go out of scope. You only have to worry about memory management if your objects are >85kb or so (chance of memory fragmentation for long-running programs).

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
c# is almost exactly as easy to use as java; funny that.
 
I moved from Java to C++ and it takes for ever to do stuff in C++, C# is way easier.

Tom
 
>> C# is way better than C++

[lol] Good one!

C# is way easier than C++.
C++ is way better than C#.

Let the flame wars begin! [swords]

-pete
 
Palbano -

Well, I qualified that with a "because..."!

Each language has it's strong and weak points. C#'s weak points are:
1. You have to download & install a 11mb redistributable
2. Only runs on Windows (for now, anyway)

C++'s weak points are:
1. Memory managment requires a Mensa membership
2. Many ways to do the same thing, 90% of which will cause a novice C++ programmer to give up in frustration
3. In the case of Microsoft's C++, it's been too closely tied with MFC to be useful as a general-purpose C++ compiler

Besides, C# is way better than C++ because... it just is!
<grin>

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
chiph, not bad except for this part:
[blue]
3. In the case of Microsoft's C++, it's been too closely tied with MFC to be useful as a general-purpose C++ compiler
[/blue]
That’s just not accurate for two reasons. First the argument against MFC to begin with is a project based argument. What I mean is that for some projects, mainly Desktop projects for the UI. MFC could be considered a real Win

The other reason is that the MFC can be completely ignored by both Microsoft C++ as well as the Visual Studio environment (both VC6 and VC7). If you have your own libraries that you would rather use the environments will let you.

And as for memory management, some would say that for many projects a Garbage Collected system is just not appropriate. In those cases which will cause a novice C++ programmer to give up in frustration … is a good thing <grin>


-pete
 
I suppose I could add to the list of C#'s weak points:

3. No Templates/Generics, which require you to write the same code over and over again when building type-safe collections.

But this will be addressed in a future release.

Regarding the novice programmer -- from a Darwinian standpoint, yes, it's best if the weak ones fail. And we can argue that all day. ;) But still, for the people who have the guts to tackle C++, you don't want to have any more barriers to success than you have to.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top