C# vs C++?
-
I'm in the planning stages of writing a vector graphics program. I've already done a simple one in VB.Net. I now am programming in C# but I'm wondering if Visual C++ would be a better language for me. Can anybody give me a heads up on what language I should look closer at? Thanks, Richard may your code be error free
I would only use C++ if I *HAD* to have a performance increase, as it will cost you in productivity and future maintainability. So the trade off depends on the actual application. I wonder though, you say you are building a "vector graphics" program, isn't that something WPF can do at light speed?
Rocky <>< Latest Code Blog Post: Linq - For the beginners! Latest Tech Blog Post: Microsoft Surface!
-
I'm in the planning stages of writing a vector graphics program. I've already done a simple one in VB.Net. I now am programming in C# but I'm wondering if Visual C++ would be a better language for me. Can anybody give me a heads up on what language I should look closer at? Thanks, Richard may your code be error free
One note in C++'s favor: There is probably a more substantial body of existing code out there in C++ than any of the other languages mentioned thus far. If you go looking for suggestions, or existing solutions to certain problems, you may want to take that into consideration.
Software Zen:
delete this;
-
I would only use C++ if I *HAD* to have a performance increase, as it will cost you in productivity and future maintainability. So the trade off depends on the actual application. I wonder though, you say you are building a "vector graphics" program, isn't that something WPF can do at light speed?
Rocky <>< Latest Code Blog Post: Linq - For the beginners! Latest Tech Blog Post: Microsoft Surface!
Rocky Moore wrote:
as it will cost you in productivity and future maintainability.
Absolutely, positively, 100% false as a blanket statement. I hate this kind of thinking because it's so reactionary. :mad: If you use C++, *and* pick good frameworks to work with, then there is no reason why you can't have excellent productivity and future maintainability. The problem is that people pick poor C++ frameworks (or none at all) and then have to (re)invent everything they need themselves. An example of a good framework (IMHO) is Qt, or the VCF. MFC, which is what's typically chosen out of ignorance or perhaps convenience, is *not* a good framework.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
I'm in the planning stages of writing a vector graphics program. I've already done a simple one in VB.Net. I now am programming in C# but I'm wondering if Visual C++ would be a better language for me. Can anybody give me a heads up on what language I should look closer at? Thanks, Richard may your code be error free
programmingAddict wrote:
Can anybody give me a heads up on what language I should look closer at?
There are several open source and commercial VG programs out there already. For example VG.NET[^] which, incidentally, is written entirely in C#. So, before choosing the language, I'd look first at not re-inventing the wheel. OK, maybe the hubs or the spokes, but not the whole wheel. :) Marc
-
C++ is more powerful. Why the move from VB.NET ( not that I'd discourage it ). If you're looking for another language because VB.NET wasn't powerful enough, C++ is the way to go. C# looks like C++, but it doesn't perform any better than VB.NET. I'm converting a web app from VB.NET to C# right now, and I am being reminded of all the reasons I hate VB.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Christian Graus wrote:
C++ is more powerful.
That statement needs to be *heavily* qualified, particularly for the level of experience the original poster appears to have. I could as easily say that c# is more powerful because it allows our small shop to put out world class software in a far shorter time frame than it used to using c++.
"110%" - it's the new 70%
-
Rocky Moore wrote:
as it will cost you in productivity and future maintainability.
Absolutely, positively, 100% false as a blanket statement. I hate this kind of thinking because it's so reactionary. :mad: If you use C++, *and* pick good frameworks to work with, then there is no reason why you can't have excellent productivity and future maintainability. The problem is that people pick poor C++ frameworks (or none at all) and then have to (re)invent everything they need themselves. An example of a good framework (IMHO) is Qt, or the VCF. MFC, which is what's typically chosen out of ignorance or perhaps convenience, is *not* a good framework.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from. c++ is clearly inferior on the exact fronts that Rocky mentioned and that's just never going to change. The sooner the reactionary luddites around here get that the better for them, but if they choose to remain working in the past I personally applaud and can't help but admire the sheer obscenity of it all and the fact that it's just that many more very qualified and probably excellent developers that will simply never be competition for my company or the products we make. :)
"110%" - it's the new 70%
-
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from. c++ is clearly inferior on the exact fronts that Rocky mentioned and that's just never going to change. The sooner the reactionary luddites around here get that the better for them, but if they choose to remain working in the past I personally applaud and can't help but admire the sheer obscenity of it all and the fact that it's just that many more very qualified and probably excellent developers that will simply never be competition for my company or the products we make. :)
"110%" - it's the new 70%
John Cardinal wrote:
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from.
"reactionary" was perhaps not the best term to use:) But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks. And much of the fault for that, I think, is a C++ culture that's obsessed with doing things the most difficult way possible.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
John Cardinal wrote:
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from.
"reactionary" was perhaps not the best term to use:) But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks. And much of the fault for that, I think, is a C++ culture that's obsessed with doing things the most difficult way possible.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
Jim Crafton wrote:
But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks
I've used a lot of frameworks in the past, I don't think that's the major source of lack of productivity in c++. The number of 3rd party component libraries and sheer quantity of high quality and inexpensive or free libraries you can use with .net is staggering and I would not be surprised if there is simply more out there for .net now than there is for c++. (I'm talking high level stuff here not nuts and bolts which .net pretty much has won hands down since 1.0). I guess I'm just not romantic at all about this, it's a business to me and I get the final decision in what technology is used and I go with whatever is the least amount of effort for the most amount of results. Maybe in a big, huge company with hundreds of developers we could afford to do things the old way, but in a small shop it's just no contest, not even remotely close. .net and c# are so many orders of magnitude faster to go from idea to released and stable and secure code in that is making a profit it's not even funny. This means my profit to work to happy customers ratio is excellent for everyone involved. I just can't fathom any argument for sticking with unmanaged programming other than ultra low level device drivers perhaps. Portability isn't even an argument any more with MONO allowing .net code to run unmodified or even recompiled on Mac's, Linux, etc etc.
"110%" - it's the new 70%
-
John Cardinal wrote:
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from.
"reactionary" was perhaps not the best term to use:) But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks. And much of the fault for that, I think, is a C++ culture that's obsessed with doing things the most difficult way possible.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
Jim Crafton wrote:
But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks.
Well, i think most reasonable people would agree with that. John's point seems to be that the .NET languages ship with a far more extensive runtime framework than that available with most C++ compilers, thus giving developers a bit of a leg up.
----
...the wind blows over it and it is gone, and its place remembers it no more...
-
John Cardinal wrote:
In my experience what Rocky said is entirely true and I've written a hell of a lot of c++ code in my time so it's hardly a reactionary frame of mind I'm coming from.
"reactionary" was perhaps not the best term to use:) But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks. And much of the fault for that, I think, is a C++ culture that's obsessed with doing things the most difficult way possible.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
Jim Crafton wrote:
But I still maintain that many/most of the problems that people encounter with C++ is because they use poor frameworks. And much of the fault for that, I think, is a C++ culture that's obsessed with doing things the most difficult way possible.
Actually, it is not just frameworks, it is the developers code also. Anyone can easily make typos that can cost you anywhere from a few hours to days to track down. Now, if you make sure to unit test everything, have validation checkers everywhere and spend a ton of time to make sure those things do not happen, and you have nice extentions so you do not have to keep an eye on memory all the time, then it will get you close to what you can pick up out of the box with C#/.NET (not including the extentsive .NET frameworks and all the wonderful extentions that are available by simply plugging them in). I wrote C/C++ code for over a decade and often blew deadlines due to things like a simple wrong assignment or possibly that great mis-matched dll or something as simple as a null pointer assignment on code that just had not got hit yet not to mention the times when something would corrupt the stack or a string variable would overflow. Yeah, those were the days of productivity? For that time yes, but not in today's world. The development world has changed and the majority of work, dev products, tools on the Windows platform is .NET. The future will continue to go that route until something better comes along not a legacy technology. But hey, each to their own, for me and most developers we follow the future.
Rocky <>< Latest Code Blog Post: Linq - For the beginners! Latest Tech Blog Post: Microsoft Surface!