|
Miguel Hasse de Oliveira wrote: What you probably wanted to say is that managed code is safer than native code. Well this is probably true if you're not a skilled programmer.
How is 'managed code' safer than native code? If i use an invalid (NULL) pointer that causes an exception from the CPU/OS i can either catch it or not. With 'managed code' i have handles to objects on the GC heap. Those handles can be invalid (NullPtr) as well and causes an exception within the CLR. Is it now safer just because my exception is now OO and managed?
'Managed code' is only safer where it takes away the power of C++. Handles can only point to whole objects on the GC heap, while with C++ i have pointer arithmetic and even void pointers.
Also those people who are promoting C# should compare it with C++/CLI.
C++/CLI is not only 20-25% faster even compiled to IL but is also way more powerful.
But as long as .net applications require a 20 MB framework and then still only run on Windows, where is the advantage? To me it seems like Microsoft made .net and C# because of the increasing demand of second class programmers who can create applications with drag&drop and clicking around.
Microsoft also made a fool of them themself here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfWindowsFormsForMFCProgrammers.asp[^]
|
|
|
|
|
I agree with you completely, in every detail!
Microsoft made .NET and C# not only because of the increasing demand for second class programmers but because they wanted Java's share of programmers.
I think .NET is great as an application's scripting engine... other than that...
Miguel Hasse
|
|
|
|
|
ABuenger wrote: To me it seems like Microsoft made .net and C# because of the increasing demand of second class programmers who can create applications with drag&drop and clicking around.
Yikes.
Personally, I find C# to be a more expressive language than C++, especially with v2.0. Closures are pretty cool, and I like the new iterators as well. There are some powerful features in C#, and when I think about going back to C++, I run into the problem of having to recreate those features. It can be done, but I don't find myself very motivated to do so.
One of the things I like about C# is that Microsoft has not sat still with it. They're actively pursuing making it more and more expressive. This often results in borrowing from other languages, many of them functional. I think this is the way of the future, a culmination of the best practises and features found in many languages. I'm looking forward to using C# in the years to come.
For better or worse, C++ does not stir that kind of excitement in me.
|
|
|
|
|
C# has a big advantage over C++, it's only targeted for desktop applications for the .net framework, while C++ is also used in embedded systems and is designed as a general purpose language.
An other advantage of C# is that it's only made by Microsoft, so changes (even breaking!) can be made way faster as if you have an ISO comittee that has to please everyone.
But we will see additions to the C language with C0X in the next years.
In my eyes Microsoft makes the mistake to add features to the language which should be in a library and not in the language.
Also while OO-programming is great, it's not great for everything. Base types shouldn't be an object.
And even worse:
public struct Double : IComparable, IFormattable, IConvertible
Maybe i should make a study, effect of .net on the global warming [because of wasted cpu cycles]
|
|
|
|
|
> There will be a moment that C++ will become too unsafe to use in real world.
Managed code is still not completely safe. You can still attempt to access null references, forget to catch exceptions, etc... The only place where managed code has an advantage in safety over C and C++ is that managed code protects from buffer overruns -- and these are where applicaiton and OS exploits often come from. However, there are C and C++ libraries (for example a checked version of the STL and the new C "safe" functions) that when used properly protect against these types of exploits.
The power of multiple inheritance, templates, and a good pre-processor are by themselves a good reason to continue coding in C++. Since there are libraries and facilities out there to make C++ safe, I don't think safety is a good reasonn to abandon it.
Of course, there are other issues such as language interop, the set of stanard libraries, ease of use of a language that may suggest something other than C++ be used for a particular application. But that's NOT what is being argued here. Safety is what is being considered and that IMNSHO is not a reason to abandom C++.
|
|
|
|
|
OK, sorry.
You all convinced me.
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Yes you are right, no matter how good C# for some applications, C++ is still good. I also use KDevelop.
|
|
|
|
|
At the time of my entry into this forum, only ~9% of the people use alternative IDE's. I wanted to know what they're using that's not MS.
When I found Dev-C++, I was looking for a Windows-based IDE that could get me on g++, and fairly handle makefiles/projects for me. (I wanted to build a project completely free of .NET). I'm no business developer, but I did make a neat deal for my friend - http://www.wsu.edu/~dbbung/DanielsMp3DevCpp.rar. Simple editor for mp3 ID3 tags.
So... anyone still using Borland?
"So far, only programming competes with computer games on my list of crack-like addictions."
Oh, and also: "I try not to be a biggot, but Lord! it's hard to be humble when you're perfect in every way." But serriously folks... =)
|
|
|
|
|
I tried Dev C++, but the compiler seemed screwy. Sometimes it would produce weird bugs that made no sense after i changed one line of code, and those bugs would usually go away if i recompiled several times.
I use C# now, but when i use to program in C++, the free Borland C++ IDE worked good.
|
|
|
|
|
I use the Bloodshed IDE along with a gcc distribution modified to generate code for the TI MSP430 processor line (from sourceforge) - they work well together.
and I do use a 12 year old Borland compiler for a DOS application that is also used in a Motorola 68K embedded system.
Steve
|
|
|
|
|
Metrowerks Code Warrior isnt too bad, a little pricy though for the limitations it has
Pablo
|
|
|
|
|
i switched from Dev-C++ to Code::Blocks (http://codeblocks.org/).
-------------------------------------------
My website: http://www.hartwork.org
|
|
|
|
|
I have to say that the VS 2003 IDE is much better than VC 6 with one stark expection--MFC related stuff. The Class Wizard in VC 6 was so much better, and I loved how you used to be able to right click on a control and choose "Events" and a list of message events you appear for that control and you could create an event handler from there. VS 2003 lacks this and really makes working with MFC projects rather unpleasant.
For regular C++ projects, though, the intellisense is far superior in 2003, and feature like code folding are really nice.
|
|
|
|
|
thisismystudipname wrote: have to say that the VS 2003 IDE is much better than VC 6 with one stark expection--MFC related stuff. The Class Wizard in VC 6 was so much better,
Well, that is a matter of taste, I think.
The way VC++6 used to fall over if one changed a minor detail to the header made me sick.
VC++7.1 is much more robust in this aspect.
You get used to the changed location of the class wizard in no time, leaving you only with increased hunger for screen size of the new IDE.
Also, the VC++6-Compiler was so utterly braindead...
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: Also, the VC++6-Compiler was so utterly braindead...
Couldn't agree more with you there. Granted, VC6 is old, but even at the time its 80% support of the C++ standard was poor. Now that I use template more and more these days I can't even begin to think of using VC6 ever again.
|
|
|
|
|
I use VS2005 or VS2003 when I stumble on the bug in VS2005. MS did a heck of job to make a C++ standard-compliant compiler. When I need the most efficient code I run gcc.
Regarding the C/CLI and C#: I am doing software for embedded real-time applications and calculation-intensive programs. We can't afford the non-deterministic garbage collector quick-on in the most undesired moment, and running the CLI interpreter is out of question.
geoyar
|
|
|
|
|
I second that MS did a great job with VS8. One of the best and most useful things in VS8 is the ability to use C++ templates, especially the STL, for mobile development. I am developing for mobile devices as well as for X86. For performance it is necessary to put some code into native libraries. These native code libraries can be wrapped using managed C++ so that they can be called from C# the language preferred for application development. None of this was possible using the EVC3 and EVC4 tools that preceded VS8.
Don't overlook the benefits of C# and managed C++ wrappers. This is a good way to preserve performance in native code libraries while taking advantage of the .Net subsystem.
M. T. Sandford
Los Alamos, NM
|
|
|
|
|
Are you saying you can use managed C++ (or C++/CLI) for embedded development? I was told by some MS Compact Framework MVPs that using managed C++ or C++/CLI to provide the "glue" between unmanaged and managed code was not possible for embedded development. They told me that the only way to access unmanaged code on embedded environments was through p-invoke. If this is incorrect, *please* let me know (and let me know how you set up your project).
Many thanks,
Kevin
|
|
|
|
|
I do not think that C# is a preferred language for app development, but I agree it is very good for programming under Windows. As a programming language it has few nice features, but the main reason for utilizing it is the .NET framework, which is a set of libraries. And you have to install this framework on your machine! C# is the property of Microsoft, and you do not know what is going underr the hood, and this is bad for embedded programming. I am aware that we all will be forced to use C# because API for the next MS OS, Vista, will be in C# (so rumor is), but for now I prefer C/C++
geoyar
|
|
|
|
|
geoyar wrote: When I need the most efficient code I run gcc.
Oops - which one?
At least the g++3-series is far inferior when it comes to optimization.
And for me, g++4 is too slow and does not compile enough of the old stuff.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
The list should have also included EVC 4.0. If you are doing development on a CE or PPC device and need performance EVC 4.0 is a must.
|
|
|
|
|
For me the problem is what to do with the nineties written code that my company won't pay to port.
At the question I answered that the environment of choice is VC6.0, because the big platform that we built in the nineties was written with that compiler. But if you ask me for new code, the answer is clear, I go for VS2005.
What will happen with old code? I don't know, but my company does: it will stay here for years to come, and it will not be ported, but it have to be modified.
-- modified at 6:50 Tuesday 31st January, 2006
|
|
|
|
|
I started with 2003 just last March. Did not want to learn
a new language (C#). Did not realize that Managed C++
Extensions was so close to a new language, I might have
will have gone with C#. Anyway -- wrote a lot of code
in MC++. Then got hit by 2005 C++/CLI. Well, a few
weeks porting and I'm at C++/CLI and going strong.
I will not go to C# until forced. I like what MS
has done with C++/CLI. I stayed behind to long in VS6,
choose a bad time to move to MC++ and had to bite the
bullet to move to C++/CLI.; But I feel I have made the
right choice. I think, it is a mistake to remain behind!
WedgeSoft
|
|
|
|
|
In 1991, as my consulting firm's OS/2 guru, I was left stranded in Europe when Bill Gates pulled the plug on that operating system.
I got deja vu all over again in 2000, when Microsoft's Phoenix-based consulting team visited my employer in Las Vegas (Visual C++ 6.0, MFC) and talked to us about .NET and the next version of Visual Studio. Within less than 2 years, I quit that gig to go solo, rather than risk my career going down the drain by being stuck squarely in the 90's. I dragged my skills kicking and screaming into the 21st century -- becoming bilingual in Java and C#. I took a hit financially, but I won't be looking over my shoulder ever again. Today I am no longer solo, receiving a regular paycheck and benefits. Perhaps I was a bit premature in predicting the demise of C++, but it will happen. With today's robust job market, there is little excuse to be stuck in a dead end.
|
|
|
|
|
I couldn't be happier writing in C++. Although I do stay as far away from managed code as possible (which is probably the reason I am so happy). For those of us fortunate enough to have jobs writing in C++ it's still great, writing apps that blow the doors off anything written in other languages. Smoking the competition is what it's all about in the business world.
Sorry to hear about your misfortune. Hopefully things will turn around for you so you can start writing in a real language again
|
|
|
|