Just a basic question if there is something soo 'hot' about c++ over c#? I am personally a c# developer for about 4 years now and have little understanding of c++. While...here are some of the things that i am aware of...and I mean the REAL pluses and minuses...the way i see it:
C++ pros:
*the standard library?
*boost?
*Compiled without "3rd party software"...like... .NET.
*Easily getting assembly output - if that would be for some real practical use these days...
* Easier, compared to assembly, ada and i'd say even delphi.
* Good generic programming support.
* DirectX
* Not so strict (compared to c# i guess) variable shadowing.
C# pros:
* Excellent RAD - visual studio...featuring wysiwig, intellisense, code highlighting.
* Huge library...the .net namespaces.
* An internet language as well - many classes for internet interaction + asp.net.
* Reflection.
* More type-safe.
* LINQ
-------------------------
So bottom line, if c++ featured some very popular and powerful analogy to visual studio + many build-in libraries for internet support it would be a total winner over c# the way i see it. However with only Qt in linux and 2-3 not so popular rads in windows i don't see it + boost and curl don't seem to be the best libraries for working with internet resources and wininet as well. Finally, connecting databases to c# is also very easy, since i've spent 2 days trying to connect the mysql connector to c++ and getting all possible errors ever, while now finally works.
10x!
27 replies to this topic
#1
Posted 11 February 2011 - 05:39 AM
|
|
|
#2
Posted 11 February 2011 - 06:28 AM
I am not sure you understand what the two languages came to be for. C# is nothing like C++, and C++ came to be nearly 20 years beforehand. It can run cross platform very portably, can access the Windows API, have a small footprint, etc. as well as access many APIs (including the Direct X just as C#, Java (with JNI) and other languages can).
C# would be the one considered "hot" as it was developed to further the quality of Windows development languages (comparable to Java), including close integration with the .NET framework and web support for ASP.NET, it is easier to connect to a database or work with the web because it was designed for that purpose (to ease developer business costs, training), C++ was never close to helping new developers do that.
C# would be the one considered "hot" as it was developed to further the quality of Windows development languages (comparable to Java), including close integration with the .NET framework and web support for ASP.NET, it is easier to connect to a database or work with the web because it was designed for that purpose (to ease developer business costs, training), C++ was never close to helping new developers do that.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 11 February 2011 - 06:57 AM
Alexander said:
I am not sure you understand what the two languages came to be for. C# is nothing like C++, and C++ came to be nearly 20 years beforehand. It can run cross platform very portably, can access the Windows API, have a small footprint, etc. as well as access many APIs (including the Direct X just as C#, Java (with JNI) and other languages can).
C# would be the one considered "hot" as it was developed to further the quality of Windows development languages (comparable to Java), including close integration with the .NET framework and web support for ASP.NET, it is easier to connect to a database or work with the web because it was designed for that purpose (to ease developer business costs, training), C++ was never close to helping new developers do that.
C# would be the one considered "hot" as it was developed to further the quality of Windows development languages (comparable to Java), including close integration with the .NET framework and web support for ASP.NET, it is easier to connect to a database or work with the web because it was designed for that purpose (to ease developer business costs, training), C++ was never close to helping new developers do that.
even kids know that c++ is very old...i am way too lazy to wikipeda that atm - but a wild guess is that c++ was originally build in 1983...or this was the date when Bjorne Stroutsrup (again...lazy to see the real spelling of the name, sorry) was when he wrote the book "the c++ programming language", i am not so sure when was the year when it officially aquired an ISO standard, but again a wild gues will be 1998.
So, while a language can be old...it can also evolve very well - php also isn't new, but evolves better than any other language, while being about the same age as c#, slightly older.
C++ just doesn't seem to be "trying" to offer what c# offers - this has nothing to do with helping new developers or complexity. I've spent many hours working with buffer overflows, simulations of neural networks, building trading strategy simulators and things that make virtual classes and generic programming look like a walk in the park - though i am always nicely surprised to learn that a programming language has ways of doing things easily and rationally. Quoting Einstein: Everything should be made as simple as possible, but not simpler than that. No one will give a rat's **** these days if someone can read assembly or knows what a virtual class is...unless of course you want to impress a poorly educated employer and get 14% higher salary.
#4
Posted 11 February 2011 - 07:23 AM
"C++ just doesn't seem to be "trying" to offer what c# offers" absolutely. It does not try, and as far as I know, it does not want to. C and C# might have closely the same name, but they are two completely different languages. You could also compare a rat to a dog. Every language has and will be designed for a purpose, and it wouldn't make sense to move away from that purpose, instead you make a new one. When picking a language you should always have a purpose. And if it is for learning purposes, then do you want to learn that specific language or just some programming language? If it's just some, then you should find one that either has been designed to be for learning purposes(best, and I would guess they exist) or you go with a language that would suit your current knowledge of programming. Know nothing, then you should go with something easy. Mastered that easy language, but want more, then you move to a more advanced one. I think the only rational time for a comparison for two languages, is when they both have the same purpose.
#5
Posted 11 February 2011 - 05:51 PM
First comment: When comparing C# to C++, you are comparing apples to oranges unless you have a GUI Toolkit in mind for C++ (there are several) and a RAD environment (there are several, depending on the GUI Toolkit).
C# vs C++ and gtkmm and Glade, or QT and QT Designer, or wxWidgets and wxFormBuilder, or FLTK and Fluid, or...
Also, comparing a language (C#) and an IDE (Visual Studio) is two different things. I can code C# just as easily in MonoDevelop, but I may or may not have intellisense. Similarly, I can code C++ in Visual Studio and get intellisense.
C# vs C++ and gtkmm and Glade, or QT and QT Designer, or wxWidgets and wxFormBuilder, or FLTK and Fluid, or...
Also, comparing a language (C#) and an IDE (Visual Studio) is two different things. I can code C# just as easily in MonoDevelop, but I may or may not have intellisense. Similarly, I can code C++ in Visual Studio and get intellisense.
#6
Posted 13 February 2011 - 09:52 AM
C++ is cross-platform (although I've learned that doesn't matter to most teenage .NET coders). You can program at a lower level, so programs written in C++ are smaller. It doesn't force OOP on you, and allows you to program in a procedural manner. There are more frameworks available for it (.NET, GTK, Qt, and Cocoa vs. just .NET). There are more compilers and IDEs available for C++, in case you don't like Visual Studio. C++ provides a better opportunity to learn how programming actually works (which I know most teenage .NET coders don't care about either). There are many advantages of C++ over C#.
Personally, I don't like either. They are both messy, usually controlled by megalomaniac corporations, and the code looks hideous. I would use a more open and less bloated language like C or Perl.
Personally, I don't like either. They are both messy, usually controlled by megalomaniac corporations, and the code looks hideous. I would use a more open and less bloated language like C or Perl.
Programming is a journey, not a destination.
#7
Posted 13 February 2011 - 12:25 PM
Which "megalomaniac corporation" controls C++?
#8
Posted 13 February 2011 - 01:13 PM
No corporation controls it. There are certainly major corporations that use it, but it's open to anybody and is free to learn and use. This is true for 99% of the languages out there if I'm correct. You might be confusing the fact that Microsoft uses it for their OS's, or that it's the industry standard for game programming, but honestly nobody 'owns' the language.
#9
Posted 13 February 2011 - 02:20 PM
I think by "control" he means controls the standards. ISO controls the standards for C++ (and C too), but I don't think they could be considered a "megalomaniac corporation".
Latinamne loqueris?
#10
Posted 13 February 2011 - 03:29 PM
My point exactly.
Both in C and Perl OO programming is possible, but also messy.
I like Perl, but I wouldn't say it has a nice syntax. Some would say you don't even have to change your usual Perl code to be able to send it to the "most obfuscated source contest" and hope for the podium. ;)
I don't quite see how you can say that it's better to use C/Perl over C++/C# - all four of those languages have their areas of application, although sometimes these areas cover each other.
Also:
There's Mono for *nix to run C# code, but I don't quite know how is it with the code portability at the moment.
DarkLordofthePenguins, I really want to know what "megalomaniac corporation" controls C++. Do you really mean C++ Standard Committee?
I think if this question won't be rephrased with WingedPanther's post in mind there's no point in trying to answer it. OP should also heed to Smilex's advice, with which I agree wholeheartedly.
DarkLordofthePenguins said:
They are both messy, usually controlled by megalomaniac corporations, and the code looks hideous. I would use a more open and less bloated language like C or Perl.
I like Perl, but I wouldn't say it has a nice syntax. Some would say you don't even have to change your usual Perl code to be able to send it to the "most obfuscated source contest" and hope for the podium. ;)
I don't quite see how you can say that it's better to use C/Perl over C++/C# - all four of those languages have their areas of application, although sometimes these areas cover each other.
Also:
"" said:
Standard ECMA-334 - C# Language Specification
[...]
This Ecma publication is also approved as ISO/IEC 23270:2006
which is freely available here: Publicly Available Standards
[...]
This Ecma publication is also approved as ISO/IEC 23270:2006
which is freely available here: Publicly Available Standards
DarkLordofthePenguins, I really want to know what "megalomaniac corporation" controls C++. Do you really mean C++ Standard Committee?
I think if this question won't be rephrased with WingedPanther's post in mind there's no point in trying to answer it. OP should also heed to Smilex's advice, with which I agree wholeheartedly.
#11
Posted 14 February 2011 - 02:55 AM
Xupicor said:
Which "megalomaniac corporation" controls C++?
Well, the vast majority of people who code in C++ use either the .NET framework or the Cocoa API, which are both controlled by megalomaniac corporations. The language itself isn't, but the frameworks for it are.
Programming is a journey, not a destination.
#12
Posted 14 February 2011 - 05:22 AM
Xupicor said:
My point exactly.
Both in C and Perl OO programming is possible, but also messy.
I like Perl, but I wouldn't say it has a nice syntax. Some would say you don't even have to change your usual Perl code to be able to send it to the "most obfuscated source contest" and hope for the podium. ;)
I don't quite see how you can say that it's better to use C/Perl over C++/C# - all four of those languages have their areas of application, although sometimes these areas cover each other.
Also:
There's Mono for *nix to run C# code, but I don't quite know how is it with the code portability at the moment.
DarkLordofthePenguins, I really want to know what "megalomaniac corporation" controls C++. Do you really mean C++ Standard Committee?
I think if this question won't be rephrased with WingedPanther's post in mind there's no point in trying to answer it. OP should also heed to Smilex's advice, with which I agree wholeheartedly.
Both in C and Perl OO programming is possible, but also messy.
I like Perl, but I wouldn't say it has a nice syntax. Some would say you don't even have to change your usual Perl code to be able to send it to the "most obfuscated source contest" and hope for the podium. ;)
I don't quite see how you can say that it's better to use C/Perl over C++/C# - all four of those languages have their areas of application, although sometimes these areas cover each other.
Also:
There's Mono for *nix to run C# code, but I don't quite know how is it with the code portability at the moment.
DarkLordofthePenguins, I really want to know what "megalomaniac corporation" controls C++. Do you really mean C++ Standard Committee?
I think if this question won't be rephrased with WingedPanther's post in mind there's no point in trying to answer it. OP should also heed to Smilex's advice, with which I agree wholeheartedly.
C++'s predecessor C does not support OOP (Object Oriented Programming), C is a POP (Procedure Oriented Programming) language.
Google knows all. I erased the ones I did not agree with.
Source
* better performance
* portability
* multiple inheritance
* deterministic destruction (allows RAII)
* any type can be thrown as exception (only classes derived from System.Exception in C#)
* implicit interfaces on generics (in C#, generics must be constrained with an interface)
* offers pointers (C# only offers pointers in unsafe mode)
* support for global variables, functions, constants
* allows default arguments on function parameters
* STL
I hope this helped :c-smile:
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









