I was speaking to a customer at work who happened to be a professional C# developer, nice guy too, he said to me today that C++ is now a dying language. Is this true? What are your opinions?
Jenova
Printable View
I was speaking to a customer at work who happened to be a professional C# developer, nice guy too, he said to me today that C++ is now a dying language. Is this true? What are your opinions?
Jenova
No, it's not. It's alive and thriving.
Nobody can really say where programming languages are headed in the future, but I would trust C# and Java programmers less than anybody else when it comes to C++ (with the possible exception of D programmers) - all of these languages were partially meant to "replace" C++.
C++ is like those stupid AS400's that just won't die no matter how inefficient they are for humans to use. Everything's a pain in the ass on it but they're so dug into companies that they can't get rid of them. All the old people here will say OMG C++ is the best language ever! No other language can come close! When in reality, I can write an application 10x faster in VB.net that works 95% as well. The only reason they say C++ is "more powerful" than VB is cuz they don't know how to do a lot of stuff in VB but they've been using C++ forever so they know how to do most stuff in there. The language can't even handle strings by itself for God's sake. It might not be dead but I'm digging its grave lol. Speaking of that, I should go to the AITP nationals in Michigan next month and kick all the C++ users' asses in the application development competition with VB just cuz I can :D Btw it's the same with C++ as it is with AS400's again. No new companies with half a brain choose to use it, only old ones that are stuck with it.
What does what you can do have to do with anything? Look around, get some experience - you'll find that there are libraries to do most things in C++ readily available. And after all that's really the only significant difference in development time: the amount of available libraries and tools.Quote:
Originally Posted by Desolator144
No, we say that C++ is more powerful because the theoretical limit of things you can do is a little further away. Not that this matters. What matters to me most is that C++ is infinitely cooler than VB.Net (or any other imperative language, for that matter).Quote:
The only reason they say C++ is "more powerful" than VB is cuz they don't know how to do a lot of stuff in VB but they've been using C++ forever so they know how to do most stuff in there.
You say that like it's a bad thing. I fail to see how. Besides, it's not like VB.Net can handle strings "in the language" - it's still a class in the .Net framework.Quote:
The language can't even handle strings by itself for God's sake.
Besides, std::string is part of the C++ language standard. So yes, the language can handle strings by itself.
<more drivel snipped>
I share your opinion CornedBee, i had a feeling that there would be some ambiguity in this topic from programmers who develop in other languages i just wanted hear what other people had to say about it.
C and C++ are not going anywhere. Visual Basic, Java/.NET, etc are all good languages, but they fulfill different purposes. If you want to rapidly develop a GUI business or database application that doesn't require an awful lot of performance, then you can use some sort of VM based language/framework.
Here are some areas that will not be switching to Java/VB/.NET or any similar language in the foreseeable future: Game development, embedded systems, performance-driven applications, servers, oh and operating systems. There are probably more, but that's what I came up with off the top of my head.
I work with embedded systems that can have between 4K and 10K of RAM. There's no way that the .NET framework or JRE is coming close to this hardware. I love C#/mono and use it all the time, but it's not going to replace C++ anymore than Java did.
VB .NET runs on C++. 'nuff said.
edit: oh, C# also.
You can't really replace a language with another language unless you either 1:1 map their feature sets, in which case the replacement language would be completely redundant and hence still-born, or extend the original language (like C++ and C), in which case your replacement language would have to offer significant advantages to be seriously considered.
The Java/.NET philosophy is a wonderful idea, but all it does is restrict the scope for which you would reasonably choose C++ over it.
Desolator: language bashing is moronic. There are truly ancient languages, older than C/C++, that are still alive and kicking because they fill a particular niche better than anything else. Whether they fill your niche or not doesn't have any bearing on whether they're actually good or not.
ASM for example. Apparently this is still in frequent use or so i have heard.Quote:
Originally Posted by penagate
Well, assembly is a special case. I think he was more talking about Lisp.
FORTRAN comes to mind. David Bradley, guy who invented CTRL-ALT-DEL and also one of my professors, talks about it all the time for some reason. I've always thought of it as a pain in the ass, but apparently he found a use for it in his job.Quote:
Originally Posted by penagate
:lol: Can I buy some pot from you?Quote:
Originally Posted by Desolator144
In Ireland it is dying because of the cost and scarcity of skilled resources. The company where my wife works is doing some major rewrites (to C# and VB.Net) because they just can't find and retain C++ developers.
He might be selling crack by the looks of that post.Quote:
Originally Posted by crptcblade
I agree with CornedBee, by no means in C++ dying.Quote:
Originally Posted by Jenova
That's because it simply is, no debate there.Quote:
The only reason they say C++ is "more powerful" than VB is cuz they don't know how to do a lot of stuff in VB but they've been using C++ forever so they know how to do most stuff in there.
C++ will never die. Why would one of the most powerful languages die?!?
The reason people think it will die is because not everyone uses it and why don't they?.....
because of its syntax and IDE
Huh? What, pray tell, is "C++'s IDE"?Quote:
Originally Posted by Hell-Lord
And what's wrong with the syntax? Java and C# use exactly the same syntax.
Nah, C++'s main problem is a lack of easily available libraries.
Well what i meant is C++'s syntax is obviously a lot more difficult that Visual Basic(obviously since it is a basic language). And yea i would have to agree the libraries are a problem as well.
Bzzt, subjectivity alert.Quote:
Originally Posted by Hell-Lord
Bahahaha.Quote:
Originally Posted by penagate
I am currently just fully getting into C++, because my course teaches it. We're all aspiring game developers, and part of our course involves C++, C#, and inline ASM. I think the C# bit is just to understand GUI's though, its not so much the programming side of it.
We also had presentations the other day, where we were told that Fortran and Cobol are still widely used and won't go away for years to come. They were saying that Fortran and Cobol programmers will be some of the highest paid people in the world in the next few decades.
chem
I would say that memory management is one major thing that scares people away. Memory leaks are easy to get and are hard to find. In languages like Java you don't have to care.
Except when you have to. I've spent hours in the last project looking for a memory leak in a Java application, created by a peculiar combination of libraries and how they are deployed.
Ouch! Let's rephrase that then :) "In languages like Java *you're not supposed to* have to care" ;)
Pointers and memory management is the reason they gave at my school for teaching Java instead of c/c++ to all the CS students
Yeah, I know. I still think it's a bad idea. I had to worry a lot about resources in Java, while in C++ it's always been simply a few seconds of thought at most, then using one of a few simple patterns.
Tools like valgrind helps a lot with finding memory leaks too :) Too bad it doesn't run in windows.
I heard the new installment of Java will be introducing pointers anyway?
chem
Java 6 didn't, and Java 7, by all accounts I could find, won't.
I agree with almost everything that CornedBee has said here. With the exception of "not trusting C# programmers". I'm a professional C# programmer and I have recently been doing a great deal of C++ programming (and C for that matter). I don't think you can really say that C# was intended to replace C++, its too different.
C# is intended to be cross platform (which requires no re-compilation of binaries between platforms) whereas C++ is a standardised-portable language which means you've got to compile it for each platform you want to use it on. Camels and horses.
I think its unfair to imply that C# programmers are less skilled than C++ programmers (at least thats what I inferred) because a great deal of the technical know-how is shared between the languages.
But anyway thats beside the point. Clearly "Desolator144" (its annoying when you find your username already taken isn't it? :D) is under the influence of some kind of chemical.
Valgrind is a Linux programmers greatest ally. Its awesomeness is not to be underestimated.
Back to the sentiments about memory leaks. If you are using C/C++ then you already know that such dangers exist and you actively avoid them, its merely part of the territory and it becomes second nature after a while. With C# you simply aren't sure that anything you do is as efficient as it can possibly be, unless you are willing to really deprave yourself and trawl through the IL code (if you are that desperate you should be using C++ anyway). That problem is 10 times worse in VB.net.
I love C# but its not 10% as satisfying as C++.
The # in C# is four plus signs arranged in a square, touching on the ends. It's C++++.Quote:
Originally Posted by wossname
The name joke aside, C#'s primary purpose is to provide a language completely integrated into the .Net framework and providing C-style syntax. It's closest relative is, of course, Java. Java was designed to replace C++ in quite some part of what was, back then, C++ territory. C# is of course supposed to do the same.
Yes, but even camels and horses can be compared as pack and riding animals. The difference in execution models has very little to do with application domain. Execution on multiple platforms without recompilation is a nice thing to have, but only essential for applets, which C# has no support for anyway.Quote:
C# is intended to be cross platform (which requires no re-compilation of binaries between platforms) whereas C++ is a standardised-portable language which means you've got to compile it for each platform you want to use it on. Camels and horses.
Besides, C++ could be compiled to LLVM IL and be run without recompilation too.
I intended no such implication. All I'm saying is that supporters of languages that are seen as improvements over another language are more likely to be biased about that language than other people.Quote:
I think its unfair to imply that C# programmers are less skilled than C++ programmers (at least thats what I inferred) because a great deal of the technical know-how is shared between the languages.
Edit: that §%=(/ memory leak in my Java program turned up again! Why can't this &§#* language let me handle my own memory?
People, save yourself a lot of grief and NEVER use Hibernate inside of Tomcat running on the Sun VM. In fact, don't use Hibernate inside of Tomcat at all. (As far as I'm concerned, I would even cut Tomcat out of that statement.)
Desolator144
C++ programmers are on a completely different level then your visual basic programmers. It has nothing to do with know how. For the most part, C++ programmers have a formal education whereas most of your visual basic programmers are people who buy a “Do this in 24 hours” book.
When you start visual basic and hit the play button, a nice little working application appears before you. A visual basic programmer would consider all this magic. A c++ programmer can run down the steps thats being taken by the hardware, operating system, and to the application which calls the function thats been assigned for the type of event generated by hardware.
A visual basic programmer will tell you that when you create a string with the line such as: dim x as string. Visual basic simply creates a small array in memory to store the bytes of your string. The address of the first byte is simply associated with your variable name and that is how visual basic references and keeps up with everything. After all, that is the most you'll normally see in visual basic books. Visual basic actually creates a OLE_SAFEARRAY structure which contains things such as the length of a string and it's members. For example, when you type Len(x), the function doesn't do any kind of counting algorithm, it simply goes to that structure in memory and gets the number from there.
A c++ programmer would not only be able to tell you this little fact, but he would tell you that he can create the same exact strings that you can create in visual basic. C++ can not only deal with strings, it can deal with strings any way that you wish to deal with them as long as the hardware allows it. That is the key difference between visual basic and C++ and all these other languages that's been trying to replace it.
C++ is a canvas for an artist and visual basic is an etch a sketch. Sure you don't have to worry about all the colors and tools but at the end of the day, your still a kiddo wanting to grow up to be an artist. C/C++ is the de facto language of computer scientist and as long as that continues, C/C++ will be around and be important.
To me saying visual basic is going to replace C++ or kill it, is like saying something stupid like mathematics isn't very important in computer science. (LOL I actually heard someone say that before).
Actually, VB strings are BSTRs, which are length-counted and null-terminated strings which store the length in the first word of their memory. Weird critters.
First dword in fact (2gb length limit on a VB6 dynamic-length string, fixed strings are limited to a meagre 64kb), although anyone needing that much string should get a new day-job.
When visual basic calls something from outside itself, such as an API or something of that nature it creates a temporary ascii null terminated str as it considers everything outside itself to be different. I suppose you could aslo say that internally, the string is a unicode bstr with a structure wrapper.Quote:
Originally Posted by CornedBee
struct SAFEARRAY
{
WORD cDims; // number of dimensions
WORD fFeatures; // bitfield indicating attributes of a particular
// array
DWORD cbElements; // size of an element of the array
DWORD cLocks; // lock counter
Void * pvData; // pointer to the array's elements (use only if
// cLocks>0)
SAFEARRAYBOUND rgsabound[1]; // structure containing information for
// each dimension
};
struct SAFEARRAYBOUND
{
DWORD cElements; // number of elements on a given dimension
long lLbound; // lower boundary on a given dimension
};
With this information, you can redim a visual basic variable from within C++.
Documentation on this is very hard to come by I'm afraid, Microsoft felt that nobody really needed to know that "low level" of visual basic. But its out there, just do a search on SAFEARRAY.
Not that hard, actually. This stuff is the basis of the ActiveX scripting system, and for the benefit of making scripting language supporters support the system in their languages, it's rather well-documented. Look for OLE and ActiveX.
Oh, and all non-VB applications that want to be scriptable from the WSH must use these low-level types, too, because IDispatch doesn't support much else.
But still, SAFEARRAY is only used for actual arrays. Strings are BSTRs. Variants are VARIANTs, which in turn could hold SAFEARRAYs or BSTRs.
How do you define a "C++ programmer" or a "visual basic programmer"? Are they genetically different? Hatched from different shaped eggs? Do VB programmers have horns?Quote:
Originally Posted by Maven
A hobbyist may use only one language, but anyone that's even remotely serious about programming would be a fool to limit themselves like that.
I've seen some spectacular VB code and I've seen some truly awful C++. Sorry, but your post is a gross generalisation on the level of Desolator144's, just oppositely biased.
I think the point was that if you become proficient enough at VB then you should logically make the leap to a more technical language. If you continue to stay with VB for no good reason then you won't advance to the level of a C/C++ programmer.
If you can program (well) in C++ you can program in anything.
The only reason I learned C++ is because I had to, but I started to use it for other things much in the way I had used VB6. For example, every once in a while I would need to make some quick tool to simplify my life and I would do this in VB -- so I learned how to do a lot of different things as I needed them. Now I do the same thing in C++, sure it takes longer, but it is helpful in learning. Furthermore, my attraction to C++ is the fact it is capable of doing pretty much everything you want it to.
Putting my 2 cents in for c++...
There are far too many great open source libraries (especially for my OS of choice: Linux) to ever go away.
The reason why C++ will die soon is concisely stated in my signature.
C++ "The discerning programmer's 200lb hydraulic tungsten toothpick" :D
The great thing about C++ and many other low level languages is that, although out of the box, it's slow to code, but you can and should build up a code base of reusable code that makes coding lots faster.
Rapid Application Development tools such as Visual C++ are nice but they're not necessary. I don't use a GUI when building my programs. I've developed a system where my controls are automatically laid out easily according to another controls position.
Besides, you should be spending most of your time on the MEAT of your code, not the visual appearance. A good program is not good because it looks good; it's good because it runs well.
I agree. I think IDE's encourage code bloat and poor quality. The only time I use an IDE now is when I'm coding C# in Windows, it would be a nightmare without it. At all other times I use text editors (vim or notepad) or occasionally UltraEdit (under duress).
If you have the flexibility of C++ you can slowly build up anything (out of toothpicks)
C++ can become anything you want it to be. It can become a high level language that is almost as easy and fast to use as C# .net is and it can be used to program small devices such as computer chips.
I've been using C++ for about 4 years now, which has given me enough time to become proficient with the language. I've also been using VB, Ruby, Python, Java, and C#. Overall, I think C++ was the best language to complete a large task. However, if you only need a small GUI application, why would you waste your time coding it all out in C++, when you can just drag/drop in VB or C#?
C++ will probably never die.
I can't help thinking the ultimate compromise is C. It does lack the higher level power of C++ but it does have compactness on its side. It doesn't have ASM's absolute speed, but it does have standardised portability.
If my life depended on it I'd code in C. Because its solid as a rock.
Compactness in what sense?
It compiles to a small executable on most platforms. Given that its used judiciously.
Yeah, it does compile to small files, at least for me, on Windows XP, Vista, as well as Ubuntu/Gentoo Linux, and Minix 3. Never tried on a Mac.
Quote:
Originally Posted by CornedBee
Teehee. nuff said.Quote:
Originally Posted by CornedBee
Readily available is not the same as easily available. Anyone who knows a bit will find libraries for just about anything in C++. They'll still have to install them, though.
"easily 1 : in an easy manner : without difficulty"
"readily b : without much difficulty"
Taken from my old pal Webster.
Besides, availability has nothing to do with using a package/library, just how easy it is to attain/find.
That being said I don't think C++ is a dying language. It is still the main language used in just about any decently sized program available. You just can't pick it up in a week like BASIC.
Ok, Who thinks C is a dying language :lol: :lol: :p
People who are dependant on BASIC languages?
I would say that this is pretty much a dying thread. Let's lock it and let it die :)