|
Richard,
What flavor of Linux are you developing on? My old Red Hat uses the KDE which comes with KDevelop, a C++ IDE. Yes, KDE is a graphical Desktop Environment written with Qt which uses the X Window System (on Linux/Unix based OS's) but, you shouldn't need the X Window System on your Linux server if your app is non graphical (probably so if it is a server based app). You can do your development on another Linux machine that does have X (so you can use the KDE and KDevelop).
|
|
|
|
|
Like in real world, the computer languages represent a culture not just the syntax or the libraries. C++ is a philosophy. It's not promoted by companies which are eager to milk the latest technologies for money. C++ is the spirit of freedom. As with the freedom, C++ has no death.
Amol blogs here: http://korpkarma.blogspot.com/
|
|
|
|
|
Are you sure?
There will be a moment that C++ will become too unsafe to use in real world.
IMHO this moment has already came...
But this is only my opinion...
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Dario Solera wrote: C++ will become too unsafe to use in real world
Garsh, I sure hope C#, VB.NET, JavaScript, PHP, VBScript aren't written in C or C++ or we're all doomed!;P
|
|
|
|
|
Actually the most part of the .NET Framwork Class Library is written in C# itself.
The C#/VB compiler, mscorlib.dll and a few other component are written in C++.
PHP, JavaScript and VBScript interpreters are of course written in C++.
This is a correct use of C++.
For business applications, websites, and some general purpose software, languages such as C# are far better than C++, because performances are not the critical factor. Important aspect for these applications are stability, security and so on.
Use C++ only when it's really necessary: kernels, frameworks, interpreters... need C++ (for now).
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Dario Solera wrote: The C#/VB compiler, mscorlib.dll and a few other component are written in C++.
If the language and runtime are written in C++, how does that circumvent C++ being safe for the real world if by your definition, real world programming uses code thats coded in C++.
Dario Solera wrote: This is a correct use of C++.
I'm glad you have the scholarly reference on appropriate uses for things. Philosophy does calculate what is right or wrong. It helps you make a choice, a decision, that is suitable to you for your own usage. However, others may choose a different path on what is "appropriate" or "proper" for their "real world" as it might be a little more complex and demanding than yours.
Be careful not to make assumptions for the general good based only your experiences and needs.
|
|
|
|
|
Dario Solera wrote: Use C++ only when it's really necessary: kernels, frameworks, interpreters...
... CAD, multimedia, signal processing, NLP, image processing, web browsers, http servers, db servers, complex desktop applications, embedded and real-time software,...
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
That moment will come when someone comes up with a *complete* replacement for it, that meets or exceeds what you can do with C++. At the moment, practically speaking, there is nothing else. Of course, you're going to say, "but what about .Net, what about C#?", well once you can implement something like this:
AGG[^],
completely in C# (i.e ALL the raster code, everything, soup to nuts), and have it perform comparably to C++, then you'd have a replacement. At the moment this is completely out of the question. Go and run some of the newer managed code, like the new VS .Net - they are performance and memory pigs, even on a 3 Ghz P4 I can feel and see the performance difference. Go load up some of the WPF apps, load up MS's Expression Interactive designer - it's a pig, and takes forever to load up. Then get back to me and talk about replacing C++ across the board.
If someone came up with a C# compiler/linker that did away with the VM (or is that the CLR?) side of things, and just burned the exe right down to ASM just like regular C++, then you might have something.
¡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!
-- modified at 9:25 Thursday 2nd February, 2006
|
|
|
|
|
Dario Solera wrote: Are you sure?
There will be a moment that C++ will become too unsafe to use in real world.
IMHO this moment has already come...
Agreed, but there is something that can be done about it:
"Safe C++ Design Principles"[^]
See a list of the latest security vulnerabilities for all operating systems and applications:
http://nvd.nist.gov/nvd.cfm[^]
|
|
|
|
|
Jim Crafton wrote: If someone came up with a C# compiler/linker that did away with the VM (or is that the CLR?) side of things, and just burned the exe right down to ASM just like regular C++, then you might have something.
You know, that might actually be the best solution to this whole problem (C++ deficienties versus it's power). I wouldn't mind learning C^3 (or whatever you'd call it). I hope Microsoft is watching.
|
|
|
|
|
If someone did that, and made it such that you didn't HAVE to re-distribute some monstrous runtime, I'd use it.
¡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!
|
|
|
|
|
Jim Crafton wrote: If someone came up with a C# compiler/linker that did away with the VM (or is that the CLR?) side of things, and just burned the exe right down to ASM just like regular C++, then you might have something.
Still not enough. For a truly general-purpose programming language, GC needs to be optional and on per-object basis. Also, it would help to have const correctness, real templates instead of "generics", free methods, value semantics...
C# vs C++ is not even a meaningful comparasion. C# should be compared to languages like Java, VB and Delphi.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Agreed. However don't lump Delphi in with C# - with the exception of templates and multiple inheritance, just about anything you can do C++ you can do with Delphi (including stuff like inline assembly). Delphi doesn't have or need a managed runtime like C# or Java. Of course, I'm referring to Delphi version 3 or 4, I have no idea if they have perverted it with a VM/managed runtime now.
¡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!
|
|
|
|
|
Jim Crafton wrote: However don't lump Delphi in with C#
I was referring mostly to the usage of the language. AFAIK, Delphi is used mostly for data-centric business applications, just like C# or VB. On the other hand, C++ is not really best suited for that purpose.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Nemanja Trifunovic wrote: On the other hand, C++ is not really best suited for that purpose.
Well this is where I'd argue with you. The reason that Delphi works well for these kind of apps, and people complain that C++ doesn't is one reason only:
Frameworks and IDE's!
Delphi's ObjectPascal comes with a kick ass framework (the VCL) and a kick ass development tool, that makes it easy to design the UI, and then seamlessly go back and forth between your code and the UI elements. Other than that, you have many of the same memory/pointer issues in ObjectPascal that you do with C++.
The difference is that no vendor has gotten off their ass and worked to resolve the situation, i.e. provide an easy to use comprehensive framework with a great IDE, the closest being Borland's C++ Builder, Qt and maybe, hopefully (IMHO) my own VCF. And the C++ community seems to have willingly gone along with this by claiming that C++ isn't fit for this kind of work. Bullshite! You don't HAVE to use every single feature of C++ to have a viable framework for people that's easy to use. Yet there seems to be this idea that if the framework doesn't make use of *every* single little C++ feature, that if it doesn't make use of massive amounts of templates, that somehow it's not really C++.
¡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!
|
|
|
|
|
How can C++ 'become' too unsafe? If it isn't unsafe now, what is driving it towards less safety?
Isn't this the same argument as guns being unsafe? I mean beside the argument that a gun is only unsafe for the person at whom it is pointed? And isn't that the point? But I digress, or regress, or sidegress...
Isn't most or all of C++'s unsafeness really that it is too frequently in the hands of lunatics? the unwashed masses who think that they are programmers, who in fact have no training, no idea and no sense? We often see these types on TV or internet videos portraying those 'brave' (read foolhardy) enough to tie themselves to the back of a rocket engine while standing on a skateboard, a doobie hanging ten off their lower lip, expecting a thrill? You know, the current version of young 'man' who's uniqueness is exemplified by the typical bed-head, unpressed clothes on a weak and too thin frame, 3-5 days unshaven and looking half asleep, with a stud through his lower lip? Or perhaps a William Hung type 'engineer' who certainly gets the press coverage but can't deliver goods worth a glass of sea water to a thirsty sailor?
Or is it all of that open-ware, written by volunteers without a responsible person having authority over their work, who produce software so blatantly better than the folks at MS? Did you hear the sarcasm?
I could go on, but I'm sure I lost you lines ago...
|
|
|
|
|
It's only un-safe in the hands of people who are too stupid to learn how to program on their own instead of relying on "managed" code.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I'm not going to comment on C++'s safety, as most of us know this is a ridiculous argument.
Code safety depends on programming skill and quality.
I'd like to remember you that C# is .NET dependent and is therefore compiled into IL. What you probably don't know is that Managed C++ and C++/CLI are compiled into the same IL (virtual machine language). I'm not going to enumerate the advantages and strengths of C++ over C#, or any other language available today, because it would be to long a list.
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. I'm an experienced C++ developer and I can tell you this, there more I use C# and .NET the more I like native C++ coding (be it client / server or web).
Miguel Hasse
-- modified at 18:49 Friday 3rd February, 2006
|
|
|
|
|
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.
|
|
|
|
|