Somebody told me today that C++ is not used for writing application software anymore, it’s only used for operating systems and things like that. Applications are written in Visual Basic or C#.
Is this what’s happening today?
Somebody told me today that C++ is not used for writing application software anymore, it’s only used for operating systems and things like that. Applications are written in Visual Basic or C#.
Is this what’s happening today?
I don’t doubt that a lot of places are moving their new development to VB/C# to take advantage of the various pre-baked components and automated memory management, but there’s enough legacy C++ code out there that it’ll never be an obsolete language.
I don’t think that C will ever disappear (at least no time soon), but I could see C++ fading out from everything but game development. C# looks to be a largely better language, if for no other reason than because the .NET API to Windows is a much cleaner interface than the Win32 API, and the default language for .NET is C#.
Legacy code will still be there to be certain, but unless you are making something that is intended to be able to make the computer sit up and sing, there’s not much use for C++. Overall, it’s just too sloppy a language.
My own company is moving not just new development, but a lot of C++ legacy code to C#.
I’m willing to bet that new C++ development is very little, especially for Windows.
To the best of my knowledge, almost all large desktop applications are still written in C or C++. Certainly if you’re writing for multiple platforms, you’re unlikely to choose C# or VB, and Java carries a set of requirements with it that not everyone has.
Is there a lot of code written in C# and VB? Sure. Does it make up a significant fraction of large, shrinkwrapped, desktop applications? I highly doubt it even on Windows, and I’m sure it doesn’t on Mac, Linux, Sun, etc.
Programmer joke: how do you pronounce the “#” in C#? It’s pronounced “rap”. (Crap, get it? ha!) Though the joke falls flat because C# doesn’t seem to be “crap”.
With that being said, C# is definitely taking over in the Windows programming world, in my experience. Especially for people intending on using the .NET framework on Windows. At my company almost all new development for Windows is done in C#.
In theory, a C# compiler is a standard that can be implemented on other platforms, but in practice, I haven’t heard of any company that has done it. Of course now that I’ve said that I fully expect that someone will come and tell me about C# on Linux.
Pretty much - except that you forgot about Java. A lot of enterprise-level software is written in Java. Sun pretty much screwed up consumer-level Java, but it is incredibly widespread among large companies. Pretty much everyone except Microsoft is backing Java in the enterprise: IBM, Oracle, Sun, etc. Java is the new COBOL.
Also, development on Apple platforms uses Objective-C, which is sort of another branch off the C tree (alongside C++). Say what you will, but Apple is definitely making a comeback.
And for areas where performance is key, C and C++ still reign.
Well, here’s an interesting list, although it’s not quite what the OP was talking about.
Checking the number of hist on the string ‘+“<language> programming”’, to see how much people are writing and posting about various languages online, gives you:
Python has moved into C#'s #7 slot from their survey last year at this time, and C# has dropped to 8th.
Indeed. And it’s just as fun.
OK friedo, that didn’t take long. A question for the programmers - does a C# implementation require a .NET framework? Meaning that you can’t write a C# compiler without having a set of .NET-type API calls for your C# program to use?
Oh, I don’t know about that. I think it’s a great language to develop in. Standardized, complete documentation goes a long way. And the immensity of the built-in class libraries is dwarfed only by the number of excellent third-party libraries available.
It is a good language for software engineering - a bad language for just screwing around and hacking stuff together. I guess that shows where my preferences lie.
No. The language itself is independent of the .NET libraries. The same can be said of Java. However, a person’s practical ability to use C# and Java is heavily dependent on how well they know the libraries, so most people consider the language and official libraries as linked.
Yes. C# at its lowest level is still an interpereted language (barring JIT-compilers) and therefore needs a runtime environment. It doesn’t have to be written by Microsoft (see Mono (which I see friedo already linked to (Program in Lisp much?))) but something has to be there.
You can write a C# compiler and use it with the existing C standard libraries and write useful software. However, all existing C# compilers that I know of are designed to target the Common Language Infrastructure Runtime, which is a Microsoft spec that describes the kind-of pseudo-VM that the .NET stuff runs on. The Mono project also implements the CLI.
Objective C has a lot of features in common with C#, and can be used independantly of the NeXT-derived frameworks with which it is usually associated (Cocoa on MacOSX and GNUstep on Linux.) GCC supports Objective C natively, for example.
The language compiles to MSIL/CIL (Microsoft Intermediate Language/Common Intermediate Language), which is then assembled into bytecode that’s executed by the .NET VM. C# is the closest language to the underlying CIL, which, in turn, reflects the organization of the bytecode. You could, I imagine, write a C# compiler that emits machine code, but some required language features might be very tricky to implement without the VM, as they require runtime support.
I evaluated that almost a year ago and it wasn’t ready for prime-time at the time. Has anyone played with it or used it recently? Is it ready to make commercial software?
One of our apps is written in C++ because we don’t want to require our users who deploy it on nodes with older OSes to have a CLR installed on that node.
Rob
Almost obligatory embedded programmer chiming in
Don’t forget that a lot of software goes into consumer electronics and most of that is written in C and lot of it is written in C++ (although that’s more of a recent development).
???
We produce research code all the time at the Naval Research Lab. Like any research place, many different tools are in use, but C++ is a significant language. As far as I am concerned, for what that is worth, C++ is a key language.
I guess I am showing my bias, but the idea that anyone would use Visual Basic for serious coding is strange to me (ducks and runs for cover).
As others have mentioned, C# is mostly divorced from .NET. But there are exceptions. The foreach statement, for example, can only be applied to an object that implements the IEnumerable interface in System.Collections (or the equivalent generic interface in System.Collections.Generic). And in the near future, new features will be added to C# for LINQ support, which will let you apply SQL-style queries to IEnumerable objects directly within the code.
I really don’t like being a language bigot, but I must say that I wholeheartedly agree with this statement.