The creator of the C++ programming language claims there has been a backlash against some of the newer programming languages such as Java and C#, with developers moving back to using C++.
The creator of the C++ programming language claims there has been a backlash against some of the newer programming languages such as Java and C#, with developers moving back to using C++.
My University is moving to Java. I spoke with some professors and there’s definitely mixed feelings. Many have expressed concerns their seemingly unrelated classes like Software Engineering, Security, and Computer Organization/architecure will have to be drastically changed.
Personally, i think teaching java as a main language is a mistake for a number of reasons:
#1: its emphasis on object oriented design is counter-intuitive for new programmers
#2: the langage is “owned” by Sun
#3: it is not the native language of any platform (C++ on windows, C on linux, etc)
#4: because of the enormous amount of object models, Java is a language that often requires a reference manual. C/C++ have a stronger emphasis on logic.
Not sure why Bjarne Stroustrup would think there has been a “backlash” against Java, C#. Why would people lash out at software that has advantages over C++ in many situations ?
“#1: its emphasis on object oriented design is counter-intuitive for new programmers”
true that Java is not easy to learn, but grant that it is much easier than C++.
“#2: the langage is “owned” by Sun”
So what, java is a pretty open environment. code is available, you can participate easiliy development of JDK now. i see no trouble for a university to chose it. the main reason universities are chosing java is, it is designed for platform independency, and it is used a lot in the corporate. wehn the students are graduated, knowing C++ will not make them earn money in most cases. C++ has a smaller and competitive market share IMHO.
#3: it is not the native language of any platform (C++ on windows, C on linux, etc)
this is an advantage. not a disadvantage.
<<#2: the langage is “owned” by Sun >>
Something that is intresting.
“JLS3 is finally available, though only as one big PDF right now. It took them quite a while to update it to reflect the new features introduced with JDK1.5.
I think it is really weird that the specifications for C and C++ are not freely available and that you have to shell out moolah to get them from ISO. Every programming language meant for general developers must have its language specification freely available. On that count, Java fares much better and full marks to Sun for ensuring that.”
http://www.advogato.org/person/rmathew/diary.html?start=76
He claims, “A lot of teaching was going to Java, but more are teaching C++ again,” but he doesn’t give any evidence to back this claim. In fact, stastistics cited by the article challenge Stroustrup’s claim.
From what I gather, C++ has indeed lost ground to Java and C#. Yet it remains an important and widely used language, and it will probably continue to be in that position for quite some time.
i forgot to write for #4
“#4: because of the enormous amount of object models, Java is a language that often requires a reference manual. C/C++ have a stronger emphasis on logic.”
i dont see an enormous amount of object model for JAva at all. this comment needs elaboration.
thing is, C/C++ means creating the wheel over and over again. In Java, although not perfect, at least nuts and bolts are defined, and available with a fairly easy to understand API. And it has a standard documentation model. in C++, you have to use different api’s for different platforms and non-standart documentation. in this acpect i find C-C++ ver very weak comparing to JAva.
C-C++ will not die and it has its place. but it is old, insecure and non-standart. so, not suitable for most situations for teaching in schools if you ask.
He claims, “A lot of teaching was going to Java, but more are teaching C++ again,” but he doesn’t give any evidence to back this claim. In fact, stastistics cited by the article challenge Stroustrup’s claim.
From what I gather, C++ has indeed lost ground to Java and C#. Yet it remains an important and widely used language, and it will probably continue to be in that position for quite some time.
I hope you’re right. The idea that future college grads won’t be compiling to binary scares the willies out of me.
Bod asked: Not sure why Bjarne Stroustrup would think there has been a “backlash” against Java, C#. Why would people lash out at software that has advantages over C++ in many situations ?
Because Java/C# don’t just have advantages over C++, they also have disadvantages (apart from ‘being owned by Sun/MS’ or ‘not a native language’) which weren’t readily visible at first.
with subsequent move to C.
At least, in most of the computer sciences courses I took, things like ‘implementing your own Linux device driver’, or RAM-based file system, or ‘implement your own flow-control, TCP-like’, or just write some monitoring tools, like your own version of PING to measure the response time, there was practically no need for C++. On the other hand, in a few instances, I had to learn Intel assembly language and how to mix it with C.
On somewhat related note, many years ago I was an IBM mainframe assembly language programmer, and I’ve written some highly optimized utilities for one company. Visiting my friend recently, at that company, I’ve been tol they were still using my utilities because everything IBM supplies although has a similar functionality, runs 20-50+ times slower, so they have to use the staff I wrote. Interestingly ehough, there is noone in the company left who can maintain or modify those programs. They all do Java and web-related staff.
“#1: its emphasis on object oriented design is counter-intuitive for new programmers”
I was a new programmer last year, I’m learning Java in an AP Computer Science class. Easy as pie and I’m a highschool student… I can’t say my opinion is very valid however since I haven’t gone into the great inner workings of the language… we’re still on data structures.
“wehn the students are graduated, knowing C++ will not make them earn money in most cases. C++ has a smaller and competitive market share IMHO.”
I’m not so sure about that. I always saw C++ as the single most ubiquitous language around. Many programmers know it, and many projects use it. The article mentions that the percentage of programmers using C++ was “46 percent in fall 2004.” While this was lower than the percent in 1998, it is still very significant.
“#3: it is not the native language of any platform (C++ on windows, C on linux, etc)
this is an advantage. not a disadvantage.”
If, hypothetically speaking, Linux were to select Java as its native language, would this suddenly be a disadvantage for Java? No. This wouldn’t necessarily cause Java to become platform-specific. What Mike probably means here is that Java lacks a sense of integration into the platforms it supports (ie., the ugly swing/awt GUI toolkits).
for a very good reason. Java is absolute rubbish interms of education. The first thing new programmers need to see is a lot of different things, they should be exposed to a breadth of concepts not deep in one very tunnel vision fashion. Not to mention Java’s OO sucks donkey balls. You’re better of with squeak if you want early OO. Better off with Icon or Haskell or caml if you want procedural.
It’d be much better to introduce them to things with Scheme. It doesn’t waste time, it’s basically a pure CS language and that’s great for a pure CS course. CS for engineers should be using C or C++ while a half-way course should use something more straight forward like Python or Ruby.
Java is best for “real” work, education at least starting off isn’t “real” work.
You’ll be hard pressed to hear good answers from java heavy programmers about advanced programming expressions. And these are necessary, the games industry one of the largest industries requires strong pure mathematics discrete and continuous, low level and high level programming skills all at the same time. There is extensive use of meta-programming and scripting languages, the need for advanced data structures and implementing mini-runtimes. All of which require broad exposure.
I’m glad to hear it. I’ve tried to learn Java, but I cant stand it. To setup a window with a single button you have to set up about half a dozen objects to handle all the fonts, colors, gui, etc., etc., etc.
C++ is so logical. I love it.
“C++ will not die and it has its place. but it is old, insecure and non-standart”.
Have you taken a look at C++ in the past 10 years?, C can be insecure, modern C++ is certainly nothing of the sort.
actually we all should start programming with a two key keyboard with our double core 2MB chache 3Ghz processors by typing “11001011…”.
C, and C++ should not be use in computer science classes anymore unless it is about embedded programming or system programming. they are the reason for dreadful security issues, and very bad programming practices. every language can be used for qulity code, but some are really hard to achieve this goal. i see C-C++ as very unstable bomb. you want to give it to a new programmer?
C++ is still non-standart and still insecure and still very hard to learn.
C++ is so bloated; really, how can anyone claim that this joke of a programming language be an _improvement_ of C? C is (as is Java) clean and minimal – just what you need and nothing more.
C++ has no unique strengths, it’s just average in every aspect (C is simpler and transparent, any idiot can learn to program Java)
So, for you programming is also putting buttons around? And you think it is easy with C++? i wonder which C++ are you using.
java’s performance is close to C++ in most cases. please stop this bull****. and it is proved over and over again.
http://www.idiom.com/~zilla/Computer/javaCbenchmark.html
Why does everything related to IT be represented as some kind of conflict, of war ? It’s always
-Linux vs. Windows
-C++ vs. Java
-Technology X vs. Technology Y
Nobody seems to remember the basic principles that 1) use the right tool for the job and 2) mind your own business. If I decide that C++ is the language we’ll be using for project lambda, then it is. I can’t understand what the fuss is all about.
More on topic, though, it is true that C++ is losing ground. The question is : why is it losing ground ? Stroustrup has to learn why and correct the language weaknesses and bring new material.
I’m more of a C++ guy, but you’re exaggerating the problem with Java:
import javax.swing.*;
public class ButtonFrameExample
{
public static void main(String[] args)
{
JFrame frame = new JFrame(“Button”);
frame.getContentPane().add(new JButton(“Press Me”));
frame.pack();
frame.setVisible(true);
}
}
C, and C++ should not be use in computer science classes anymore unless it is about embedded programming or system programming.
Actually in Computer Science classes they should be using a language which is not in widespread commercial use – to encourage the students to learn the principles of programming instead of getting caught up in the latest marketing hype.
C is (as is Java) clean and minimal – just what you need and nothing more.
Right. And that’s why they are not about to release Java version 1.5 with added features (some of them inspired by *gasp* C++).
“Nobody seems to remember the basic principles that 1) use the right tool for the job and 2) mind your own business. If I decide that C++ is the language we’ll be using for project lambda, then it is. I can’t understand what the fuss is all about.”
Ditto that.
“why is it losing ground ? Stroustrup has to learn why and correct the language weaknesses and bring new material.”
As I see it, there are two major points:
– C++ does less sanity checks than ‘safer’ languages such as Java/C#.
– C++ has so many different libraries with different philosophies that it has become quite messy.
The first issue is probably not going to be fixed by the language itself for performance reasons (although things like ‘safe pointers’ supposedly address the problems adequately).
The second issue is analogous to Linux’s fragmentation dilemma (9 text editors, 3 web browsers, 50 million distributions, etc.). Someone would have to select one library, with a consistent way of doing things, ensure it has complete functionality, and get people to start using it. And I honestly can’t see that happening.
More on topic, though, it is true that C++ is losing ground. The question is : why is it losing ground ?
I have to say I’ve seen the same thing as Bjarne. I personally know developers who’ve been using C# for several years now beginning to move C++ into a larger, more dominant role within their projects. I’m helping one in particular with his education (since he asked me to), and he’s absolutely loving C++. I’ve seen more C++ job posting lately and have been offered more work with increasing pay for my C++ knowledge.
You naysayers, I understand YOU may not like the language but its downright silly to get into a religious war over something you may know little or nothing about. I don’t think Bjarne was knocking your favorite language; if your happy in Java heaven, then I’m sure he’d say good for you! Bjarne (and Herb Sutter too) has seen a trend and commented on it. That is all. Its one I personally relate to cause I’ve seen it as well.
“Java is ultra slow, and people dont write drivers with java and c#.”
If you’re writing a driver, then by all means use C/C++. But Java is usually fast *enough* for higher level applications.
The statistics provided by the article seem to indicate that it is losing ground (C++ usage down from 76% in 1998 to 46% in 2004), although personally I also haven’t really seen anything to support that conclusion. It makes me wonder how credible/biased the Evans Data survey analysis was.
I dont think that people are moving back to C++. C++ has so many problems, the language simply is overdesigned, getting in the way to code stable programs in a decent timeframe, the ISO norm is a joke from a class lib standpoint, and now after 14 years in existence the compiler vendors still fight with the task of fulfilling the specs to 100%.
C++ back then was the worst language derived from C to get a widespread adoption (objective-c was and still is myriads simpler and better to handle)
but developers flockt onto that problematic language (I was one of them)
because the thousand pages of features looked cool and there was hype everywhere. Now we have to live with constant crashes, memory leaks, security problems and lots of other nastyness, caused mainly by the widespread adoption of this language in the early and mid nineties.
I for one would be happy, if C++ would get a slow but decently deserved death, in favor of better alternatives.
StrStroup simply overdid the language design and left out the most important aspects of every OO language, a good and stable and big class library. He should have taken a huge lesson from the Smalltalk people while writing that hack of a language.
The languages are fine. It’s the way they are taught. How many C books still teach the use of gets() over fgets(), or C++ books that don’t mention using std::string or smart pointers?
Java is ultra slow
That used to be true, especially on the desktop, but it’s not so true anymore. On the server, the two are pretty close. On the desktop, C++ is still sometimes faster….but it’s getting close even there with technologies like SWT.
Performance tests show Java as fast as C++
http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html
As for which is easier to learn, I took 3 semesters of C++ in college. But the stuff we learned could have easily been taught in Java. Two of the three semesters dealt with basic programming and data structures. A ‘Queue’ or ‘Stack’ can be written in Java and C++ very similarly. And I think OO programming would have been easier to learn, IMHO, with Java because everything in Java is an object (except for primitives).
I had one semester of Java and liked it MUCH more because it was actually useful! We never did any gui programming in C++, so no one liked it. But people liked Java because we learned gui programming (applets and awt applications). Of course GUIs are written in C++ all the time….but it’s not as easy, and I havne’t seen it taught in school.
Personally i feel the best starter languages were BASIC the PASCAL. After you learn those two languages you can move on to whatever. Compairing Java to C++ is like compairing an entire car to an engine.
I hope you’re right. The idea that future college grads won’t be compiling to binary scares the willies out of me.
Amen! JIT? sounds to close to git
One other advantage of Java over C++ is J2EE. With J2EE app servers, you don’t have to write everything from scratch. You can write a component (EJB, Servlet, JSP, etc.) and deploy it into a container that manages it.
In this corner C++: powerful, verbose, potentially hard to maintain (macros, operating overloading, etc. = potential for programmer ‘tricks’ which obscure code intention), can be fast, can’t manage it’s own memory, takes years to really understand it, source code can be cross-platform IF you are careful.
In the other corner Java: powerful, verbose, resource hungry, can be fast, takes out the garbage for you, takes years to really understand it, pretty darn good for cross-platform applications.
I think Java needs decent GUI library (it is improving in this area however) and efficient compilers (to machine language, not bytecodes).
Interpreted languages are good to develop and test programs but they have performance worser (even with JIT compilers) than compiled languages.
In my opinion C++ can be used quite neatly instead of C (the compiler, the language). You can preserve the performance and improve program stability by using references instead of pointers (where applicable), string instead of char* and vector/list instead of conventional C arrays, etc.
However as a RAD tool, C++ isn’t the most applicable language.
I have a split personality here…
15 years ago I used to program in assembler. It was my hobby, I earned barely a buck with it. Last 7 years I’m living by Java (Corba, EJB – you know, all that “modern” toys :-). It’s really amuse me when some “cool” c programmers starting to insinuate that Java is slow and at the same time has no knowledge about what micro is. This is an algorithm what makes software run. In the university I’ve been studying we had both electronics and software discipline and study both structure and OO methodology with several languages (like pascal, lisp). IMHO Java is the best way to study OO and Pascal to study structural programming (why no? people study latin :-).
Knowing Java you can start study C++ (if you need) IMHO it’s the better to move to C++ from Java when from C – I’m seeing to much programmers thinking they are programming in C++ just because they are using VisualStudio3000.
So my vote –
Java for Universities
C++ for OS and critical mission application (where money no matter)
C# as research project sponsored by Microsoft to see for the possible improvements for Java 😉
🙂
Out of curiousity, what language is a JVM written in, and .NET for that matter. If it is C and C++, then we are going to need people around in 20 years who can write in fast low level languages to create and improve the virtual machines and interpreted languages common today.
Since when does a popularity of a prog. lang. decide on tools I’m going to use for my project? Never. Be smart, use the best tools for your work and profile the code and test it to make sure you’re using the right tools. Even if one person uses C++ out of millions and it’s the right tool for his work then the existance of C++ is justified for that person. Just like VB/C#/Java are the right tools for some users.
Because Java/C# don’t just have advantages over C++, they also have disadvantages (apart from ‘being owned by Sun/MS’ or ‘not a native language’) which weren’t readily visible at first.
just some correction.
C# isn’t onwed by MS, C# is a open ISO/ECMA Standard.
…It’s that they are too much like C++. They inherit a lot of C++’s issues with regards to syntax and structure. IMHO dynamic languages like Python have cleaner syntaxes and better object models.
For speed, there’s nothing wrong with good old C, and compared to C++, it’s a much more elegant language.
I’ve used C++ with success, but it’s third on my list after Python and C.
That used to be true, especially on the desktop, but it’s not so true anymore. On the server, the two are pretty close. On the desktop, C++ is still sometimes faster….but it’s getting close even there with technologies like SWT.
It’s a fallacy that SWT is faster than Swing. A few years ago it used to be true that SWT was faster, but Sun has focused on UI improvements in recent JRE’s. I saw an interesting demo that compared SWT application performance against Swing applications at SDWest. On Windows, where SWT has been havily optimized, SWT performance is comparable to Swing. On linux, Swing is MUCH faster than SWT.
I think C++ problem is lack of new standard libraries. Java is more practical than C++ for some functions because Java has many ready libraries.
Pointer insecurity and memory leaks on C/C++ can be resolved/reduced with auxiliary develop tool like valgrind and similar tools.
Even if Java is fast, it has more memory requirements and slower startup than a traditional compiled C++ program.
Its called CORBA & CCM. Look it up before you post such nonsense.
Haskell or caml if you want procedural
Haskell is “functional” and “procedural” is another word for “structured” which is the ugly bease (ie C) and Fortran, Ada, Pascal territory.
#4: because of the enormous amount of object models, Java is a language that often requires a reference manual.
All languages do, fortunately Java provides the best documentation: JavaDoc. Seriously between using man pages and JavaDoc the choice is easy.
C/C++ have a stronger emphasis on logic.
Hog wash. All the logic you want to do in C/C++ you can do in Java. Hell, you can write Java in a procedural style be liberrally using “static”. Thats what the first years do.
Not to mention platform independence. I was working on a networking assignment and got different results depending on whether I was using Linux, FreeBSD, or Solaris. None of the problems with Java.
Well, I happen to like both C++ and Java. Java is a great language to teach beginning students, because they don’t have to worry about getting seg faults and figuring out what caused them. They don’t have to worry about cleaning up memory or messing with pointers. Instead they can focus on some of the larger ideas. And OO programming is easier for new people to understand, it’s only hard if you’re already used to procedural languages. Java is also great for RAD.
But, C++ is great for other projects. Advanced programmers can do optimizations and tricks in C++ that aren’t possible in java. I also think it’s important for students to get into some lower level programming, to really understand what’s going on behind all the high level languages.
Out of curiousity, what language is a JVM written in, and .NET for that matter. If it is C and C++, then we are going to need people around in 20 years who can write in fast low level languages to create and improve the virtual machines and interpreted languages common today.
I’m not sure, but probably C. Lower level languages are always going to be around. Assembly is needed to use hardware, and C is a natural abstraction above it.
I’ve used C++ with success, but it’s third on my list after Python and C.
i agree, for me i also see less and lesser arguments to use C++.
For teaching i think Ada95 is a great language, it’s easy to read, teach good coding style. Ada95 isn’t popular by geeks, but it has really advatages for teaching and is often used in industry.
1. Personally i like C for console programs, libs, drivers and other basic thinks. C is simply small and cute.
2. For prototyping and small apps i like scripting languages like python, perl and scheme.
3. For “high-level-apps” i like C# with Gtk# for GUIs.
With this three groups i have covered all areas with imho great programming languages and frameworks and i see no gap were i should add C++ today. C++ can be something between 1 and 2 and something between 2 and 3 but it fits nowhere perfect. From year to year i see lesser arguments to use C++.
Why is it that universities have to teach exactly the languages that are currently most wanted on monster.com?
As I see it, the purpose of a computer science university education is not just to produce worker drones that are familiar with the currently popular languages for writing boring database applications.
Universities should teach the most advanced languages, and have students adapt to radically different programming paradigms.
A student that has mastered a functional language like clean, haskell or ocaml, a low level language like C, a dynamic language like ruby or python and maybe some lisp or scheme will have no problems whatsoever to adapt to the language fad of the year even in the year 2020.
A student that has been trained only in very similar (and very boring) OOish languages like C++, java and C# will have much more problems adapting when another programming paradigm becomes popular.
I hope you’re right. The idea that future college grads won’t be compiling to binary scares the willies out of me.
Java and C# is already compiled to “binary”. It’s just not machine language, which the JITer produces ahead-of-time, before it’s run, or at runtime (in the case of HotSpot).
Some of you mentioned that people should use the tool best suited for their job, but if they don’t know anything besides Java or C#, then how would they ever choose C, C++ og other low-level languages??
I find objective-c as beeing a great language, but I had to look a bit to ever find the language.
I learned Java at the university, and I’m worried cause my colleages, don’t know other languages and allways choose Java, instead og other more suitable language.
I think they should learn C og C++/Objective-c at the university, cause it’s a easy step to move to a managed language (Java, C#).
I learned Java at the university, and I’m worried cause my colleages, don’t know other languages and allways choose Java, instead og other more suitable language.
How is that any worse than learning just C, or just Scheme, or just Assembly> Really, if your University just teaches one language then you are in trouble.
In my program we learn Java, C, C++, Bash, Sparc32, VHDL, and Scheme. Between these I think undergrads have all their bases covered. I think Perl would be useful too just for the practice with regular expressions.
They teached us SML, but now they have changed. The new students will not learn SML anymore but C. So there are good news. But they will still learn Java later. But the embedded group learn assemply and C.
But those who started at the time I did, only know SML (if they ever used it) and Java.
Bjarne Stroustrup, if he doesn’t see the need for a complete overhaul of C and C++ into D, then he out of tough with reality.
C++ is the Kitchen Sink of programming languages.
I’ll stick with Java, but only a fool would ignore to mountain of problems with C/C++.
http://www.digitalmars.com/d/
My opinion is that university students should be exposed to 4 different distinct languages during their education:
One should be C simply because everyone should learn to do manual memory management.
Next some asm should be learned in a systems programming / machine logic class. Most universities still do this.
Another c++ or java, simply because they represent what is used most today.
Lastly a language in the lisp family.
This is a rough blueprint; I think the emphasis of learning languages for a CS degree is sort of silly. Computer science is definitely NOT learning a few different programming languages.
Yeah, that’s exactly what I was going to post.
The only language I have learned in my program (Computer Engineering) was C++ and it was an introduction to programming. We have many classes on algorithms, OOP and the like and while many classes are enforcing a specific language, we have to learn it by ourselves. Of course, marks are given for the quality of our code so you cannot get away with undocumented spaghetti BS…
There are a lot of things in each language that can be viewed either as an advantage and as an inconvenient.
Take C++ tack of an extensive standardised framework, for instance. Java/.net people see it as an inconvenance, but on the other hand, what would happen if each language had only one framework ? It’d be a rather stinky one. People would be forced the choices of whoever did the framework down their throat.
There are different ways to do a lot of different things, forcing one guarantee that no one will ever bother to find a better one.
Of course, there are also cases where a language with a standard framework makes sense.
People always reproach C++ problems. Yes, there are problems. But java/.net also have problems of their own, too.
These languages, with their non-deterministic garbage collectors, are supposed to make things easy, not to ever think about allocating or freeing stuff.
Well, it doesn’t work for other resource types than memory. You can forget to close a file, close a socket, or anything else that isn’t just memory resource in these languages.
You can shoot yourself in the foot in non-obvious ways. A friend of mine who write vb .net code at work told me a lot of horror stories. Mostly thinghs like “why does our code is so slow ?”, then they realise that some seemingly trivial piece of code eats up tons of heap space because the way the code was written, a lot of temporary objects were created for non obvious reasons.
People also have an annoying tendency to underestimate what C++ can do because it’s not all new and shiny. There are very useful, practical, clear, safe and concise ways to do things that just aren’t possible in .net/java, like the RAII pattern.
There is more of an almost standard framework as is generally thought, thanks to boost libraries – and not actually that much need for reinventing any wheel.
I can’t believe that people aren’t hammering this point home.
C++ and Java/C# are used for different things. You wouldn’t want to build an enterprise web site in C++. You wouldn’t want to build a research simulation in Java, etc. etc. You use the tool for the job.
The point of universities should be to teach students to learn languages for themselves. At the end of a degree, any given student should be able to switch to C, C++, Java, C#, Perl, Python, etc. etc. etc. very easily.
My university taught Eiffel. Who the hell has heard of that? Nobody uses it in a practical sense. Yet it is a great teaching language for OO concepts. After graduating, I went to a C# coding job. I learned the damn language in about 2 weeks. That is the outcome universities should be aiming for.
I can think of no reason why most programmers would ever want to know C++. Other than some very special software, it just doesn’t make sense.
Now if someone really wants to learn how the computer thinks they should program in assembler – I did as my primary lang for years and I learned a lot. Maybe C can also help – but definately not C++, it just drives people nuts.
Most programmers only need to know about managed code environments – such as Java or C# or Parrot or Ruby… That is definately the direction the industry is moving. And, by the way, learning OO from the begining is much better than learning OO after learning procedure lang. Why do people still insist that OO is difficult?
I taught OO at a Tech College for 2 years – its not hard if you know what to teach. OO is all about relationships between separate classes – its not just about inheritence, but everyone wants to talk only about inheritence and signature matching and all that BS. Yeah, eventually you need to know that, but for starters you just need to know about one-to-one, one-to-many and many-to-many relationships. Learn how to program these relationships and then how to use these to model a complex system and you have learned useful OO programming. Leanring about bunch about overrides and overloads won’t translate into a good OO designer…rant rant…anyway to heck with C++ in my opinion, I never liked it. Probably my less favorite lang, and I’ve programmed many many languages. Maybe even like Cobol better, or maybe I’m just sentimental, its been 13 years after all.
“I can think of no reason why most programmers would ever want to know C++. Other than some very special software, it just doesn’t make sense.”
Right, because in the real world, C++ is only used in a small number of very specific pieces of software, so there’s almost no way C++ would help a programmer seeking employment.
I program C# all day, and it is extremely easy to use. You get to think in terms of program structure, because you definitely don’t have to worry about destroying objects or counting references or any of that other stuff.
I could see colleges starting a student out in C, then C++ (intro to OOP concepts), and then in the later years, C# and/or Java.
The business world is moving away from C and C++ at a very fast pace because you are simply more productive with modern OOP lanaguages.
…but anyway, the two languages everything in the world should be written in are Python and Ada (and for Ada, I prefer v83). (My two favorites. )
The one think I prefer about C++ is that you are more likely to implement your own lists, dictionaries, trees, etc… where it seems like Java has them already for you. I guess I like to get a little dirty from time to time. (on the other hand, I haven’t touched c++ in over 8 years… so I could be mis-remembering).
One last thing… Java is an alright language, nothing spectacular, and it comes with vast libraries, which are useful, but when you start glomming in all the J2EE architecture and libraries… UGH! It has its uses, but too many people are writing little web apps using EJB’s when they are completely unnecessary, just because they are a cool technology… ;/ Grr.
Hey. There is nothing wrong with the Latin language. It may not be used anymore, but it is the basis for a heck of a lot of our modern languages. (yes, I was in the Latin club)
When I taught “Programming Languages” at a local, NE college I selected Python for my example language. It didn’t represent all the different types of binding, but it was useful in both OO and procedural examples. Java was on my list of choices, along with Ada (really wanted to use Ada, but couldn’t convince the school to download and install GNAT on their workstations). BASIC, C and Pascal were down at the bottom… along with COBOL.
Part of the reason I did NOT use Java, and this might sound ridiculous, was because everyone WANTED to use Java. I think it is nice for students to be exposed to as many different flavors as possible.
It turned out well that I selected Python because half of my students (who were supposedly 3rd year) had never even heard the term “late binding” before. 8( Some of them had trouble just with the concept of declaring variables – Python is forgiving enough that they could at least feel like they accomplished something… if I had used Java or Ada I would have had to dedicate the first 2 weeks of class to teaching them how to write the canonical “hello world” program!!!
languages have their domain. C is good for systems coding. python is great for higher level tasks. prolog has its own domain. but i’ve never found C++ to be good for anything.,
i’ve be grateful if someone could point out a scenario where C++ was a better solution than any other language.
I took we were exposed to about 10+ languages. We picked them up to varying degrees. If education institutions standardize the majority of courses on one language, are outright stupid.
One should be exposed to a hell of a lot of languages during their Comp Sci education, that’s the only way mantra retardation is avoided.
i’ve be grateful if someone could point out a scenario where C++ was a better solution than any other language.
Sometimes your hands are tied.
In my final year of uni, my project was to build an H.323 multi-conferencing app. Now, the H.323 spec is huge and complex, so it makes sense to use a library. How many Java H.323 implementations are there? None. How many pure C implementations are there? Few. On the other hand, OpenH323, the best-supported open source library out there, is C++.
Now yeah, we could have used cross-language bindings and coded it all in Python or something. But we’re not into that, just like how we’re not into self-mutilation.
Games!
I’m talking about fast, graphics intensive games. Not any other kind.
On the whole I generally agree that C++ is a digustingly ugly language. But like most perverse things, it’s sort of faschinating in all its fuglyness.
you are wrong about C#. language spesification mught be in ECMA, but without .Net C# is nothing but dry syntax. So, .Net is closed source (as nobody can see the code), owned by microsoft and protected by patents. so, do not mislead people..
“languages have their domain. C is good for systems coding. python is great for higher level tasks. prolog has its own domain. but i’ve never found C++ to be good for anything.,
i’ve be grateful if someone could point out a scenario where C++ was a better solution than any other language.”
Now that is just plain silly. Here is a link to just a small representative sampling of C++ being used for real world, high profile projects:
http://www.research.att.com/~bs/applications.html
Check it out – KDE, Sun products, HP products, scientific stuff, Adobe, Amazon, AT&T, OS/400, Google, Code Warior, QT, SAP, many, many video games, and various telephone systems are some examples of high profile, large, efficient, robust systems being implemented with C++.
Personally, I prefer C slightly more than C++, but C++ rocks for a lot of situations.
The company I work for does IP PBX & VoIP work.
C++ has been perfect for this application, it’s about the right tool for the right job, people who make statements like ‘X is good for nothing’ simply are not very intelligent.
Maybe we should stream those audio frames in Python!
I don’t understand C++ very much, and I don’t uderstand many of the advanced features of D. But I think that D for compiled and Euphoria for interpreted are the two best languages out there.
I actually like a lot of Java, but the speed issue is still the killer for me. The thing is, I don’t understand why it seems so slow. The benchmarks all seem to indicate that it’s pretty fast, but most emulators for even the slowest of systems seems to lag on modern computers. While my 200mhz pda handles emulation of the same systems, using emulators written in C or C++, with ease. Anyone know what the problem is in these cases? Is there just something about Java that doesn’t lend itself to emualtors, is is the jvm really that slow?
Who cares nowadays about the programming language? The beauty is, there are a lot of different high quality programming languages, which makes it very convenient to choose the right tool for the job. The problem is, most people/companies try to do everything with one technology. Just because you have a nice hammer, not every problem is a nail.
Is there a place for Lisps anymore, specifically Common Lisp?
I haven’t really heard anybody to be standing up for CL in this thread. It seemed, to me a least for a short while, that lisp was gaining momentum again. Has it really been abandoned as a viable language?
This comment below is total BS. Anyone that knows .NET, ECMA runs 2 things.
1. C# language
2. CLI/CLR
This includes the basic class library (excluding ASP.NET, Winforms, ADO.NET).
Anyone can implement C# and its class library which puts it on par with many languages instantly.
Also I have no idea why companies/people like to lock themselves into a language (Java) that the future solely depends on one company.
The CLI/CLR can support tons of languages, you use what YOUR comfortable with coding. I think this is the future of development. Same library, but use the language your comfy with.
“you are wrong about C#. language spesification mught be in ECMA, but without .Net C# is nothing but dry syntax. So, .Net is closed source (as nobody can see the code), owned by microsoft and protected by patents. so, do not mislead people..”
c++ is used extensively by pixar, mentor graphics, cadence, and any other type of CAD programming where you have millions of objects that need to interact with each other and you also need the performance (java is too slow at the moment).
Cognos, Microstrategy, Business Objects, etc (some of the biggest names in BI) are also written in C++.
Ditto to whoever said right tool for the right job.
There are some things C++ beats Java in, and some Java beats C++. There are probably even things C# beats the others in too 😉
If you can code in them, then it’s down to personal preference I guess…
It also comes down to the framework you want/have to use and/or platform which can help dictate the language of choice (as I rediscoved last weekend when coding for a Pocket PC)…
Most of us reading this thread are programmers aren’t we?, and we all are grown up now aren’t we?
So I’m assuming like me you can choose between C/C++/C#/Objective-C/Java/Ruby/Delphi/XUL/etc… (OK, we get the idea ;-)…
If so, then what is the problem?
My advice to programmers out there is learn the tools of your trade. Just because you are really good at one doesn’t make the others bad.
I must repeat to myself: Don’t waste time on such useless and no end discussions.
Looking for C++ apps ? What about every single video game on the market ?
I hate it when people just keep hammering “C#/Java/socalled modern oop languages” are better than c++, yet they never, ever explain why.
imagine doom3 written in java, runnin on your new shiny jvm now imagine hardware specs that would let this game run decently…
you are wrong about C#. language spesification mught be in ECMA
i’m right! I talk about C# and not about .Net. C# is a language like C, C++, Pyhton,… and C# is an open standard.
Together with Gtk#, apache#, gecko#, gst#, gnome#,… you have a great (Free Software) framwork based on an open standard.
additions to my last post:
If i talk about C#, CLI and Mono or dotGNU people often think about .Net. This is a huge mistake!
There are three different thinks:
1. C# and CLI the base for everything and this is an open standard.
2. Microsofts implementation of the standard with there own libs.
3. Mono and dotGNUs implementation of the standard with there own libs and a compatibility stack to the ms libs.
2 and 3 depends on 1 and 1 is an open standard.
That’s the same like for example C++, MS also has a C++ compiler and C++ libs for there system. Does this affect a C++ compieler for GNU/Linux or a C++ compiler from Borland or a GNU or Borland lib for a special task? No!
You have to be careful, .Net is just one implementation from one company. But it has nothing to do with implementation from other people.
imagine doom3 written in java, runnin on your new shiny jvm now imagine hardware specs that would let this game run decently…
actually it would run fine, as not much depends on software nowadays but more on graphics card, just have a look at the JAKE2 project to see what can be achieved with java, jake2 is a quake 2 port to java and it runs fine almost as good as the original http://www.bytonic.de/html/jake2.html
The business world is moving away from C and C++ at a very fast pace because you are simply more productive with modern OOP lanaguages.
I coulndn’t think of a dummer thing to say if you’d have paid me to. 1) I’ve been programming business applications in C++ for nearly 10 years now and the workload for C++ is INCREASING, not decreasing. 2) I’m sick and tired of comments like “java/vb/c# makes you more productive than in c++”. Statements like that are pure bunk. These languages may have made you more productive but it certainly doesn’t hold true for all situations. It comes down to how well you know your subject matter. At my last job, for example, the other developers all coded in VB6 (still). They’d routinely say something stupid like, “we could use C++ but VB makes us more productive,” and yet I’d be the one, writing code in C++, to consistently complete my projects faster than the VB guys do. Why? Because I know what Windows provides better than any of them and can use that to my advantage. The other guys couldn’t code anything that wasn’t provided by VB out of the box and knew nothing of Win32. This made them SLOW, SLOW, SLOW when it came to getting work done.
The last thing I’ll say is this: OOP is way too overhyped. One of the factors I attribute to my own huge success with C++ is that I don’t feel the compulsory need to write sadistically large, deep OO heirarchies. Why be forced to write an object when what I need is a good generic algorythm? My C++ designs tend to have small, shallow OO heirarchies with a lot of generic (template) algorythms to help me get the job done. IOW, favor composition over inheritence. This is well-known idiom and C++ let’s you do this better than just about any other language I’ve personally tried. Java/C# don’t provide this. They force OOP down your throat even in situations where OO doesn’t make a lick of sense.
I went from C# back to C++. Or to be more correct, C++/CLI. I still want to code for .NET, but I like the C++ syntax more, and I get a preprocessor and templates again.
Multiple inheritence is the reason why, when given the opportunity, I did not switch to Java for my personal projects (though I was required to use it at work). Mono looks interesting, but it lacks C#’s only real selling point (for me): integration with .NET.
Facts are facts: no other language does anything that cannot also be accomplished cleanly and robustly in C++. And yes, I’m aware you can say the same thing about C. And Java. And C#. And assembly. In the end, these programming language pissing contests are asinine.
Unless you’re talking about LISP or COBOL. They just suck.
I am a developer – freelancer.
C -> C++ -> Java -> Python.
That is the order in which I learned programming languages. There is a PHP too, but it exists somwhere in parallel.
I DO NOT have time to build my projects in C or C++, and my customers will not wait for me to finish them. The amount of code to accomplish something is rather big, so it would be too expesive. Python is probable the fastest way to code, but it lacks some standard API’s that need to be built in by default. One can not expect to have sysadm at certain customers site to have time, willingness and skill to compile and/or install everything needed.
Java is the optimum. One can write code pretty fast, and add new API’s by just dropping JAR file into some directory.
PHP has great productivity, but it is bit “untidy”, at takes
a lot to cacth all the bugs. The interpreter allows you to write almost anything, and it tries to execute it the best it can.
I do not code “low level” things, and I hope I never will. Mostly business applications, like planning, tracking business results, database things, lot of web apps. etc.
DG
I am a developer – freelancer.
C -> C++ -> Java -> Python.
That is the order in which I learned programming languages. There is a PHP too, but it exists somwhere in parallel.
I DO NOT have time to build my projects in C or C++, and my customers will not wait for me to finish them. The amount of code to accomplish something is rather big, so it would be too expesive. Python is probable the fastest way to code, but it lacks some standard API’s that need to be built in by default. One can not expect to have sysadm at certain customers site to have time, willingness and skill to compile and/or install everything needed.
Java is the optimum. One can write code pretty fast, and add new API’s by just dropping JAR file into some directory.
PHP has great productivity, but it is bit “untidy”, at takes
a lot to cacth all the bugs. The interpreter allows you to write almost anything, and it tries to execute it the best it can.
I do not code “low level” things, and I hope I never will. Mostly business applications, like planning, tracking business results, database things, lot of web apps. etc.
DG
Pretty much the only language taught in CS at my university (apart from SQL) is Java. Everything is done in Java, with only one semester of C.
The biggest problem, as far as I can see with Java, is that CS grads don’t end up knowing how to manage memory. They are never taught about allocating and deallocating memory and keeping track of references, etc. In Java, the heap is garbage collected, so when a reference goes out of scope, you don’t even think about freeing that memory.
Programmers need to know about what is really going on, and programming basically on the bare metal like with C is the best way to go about it.
lets just hope memory management becomes a thing of the past!
I learned to program with C++ at my university, and I’m glad I did. The reason being it was fairly easy to pick up C, and absolutely trivial to pick up Java. I think C would have been much more difficult to learn if I had started with Java first.
With that said, 2 classes below mine they changed to Java for first year students. They went with it because they felt it was easier to learn and might attract more students, and in particular females, to the CS department.
“lets just hope memory management becomes a thing of the past!”
This doesn’t make sense. As long as there is memory, memory management will exist.
I guess your point is “memory management by hand”, with the implication that you have to do it in C++. I don’t know how many time the fact that automatic resource management does exist in C++ have to be stated before it sinks in people’s mind.
It’s done differently than in java/.net/whatever, but it’s just as easy to use, much safer in many cases, and yes, there are pitfalls – just as there are some in so called “managed” languages.
Explicitely allocating and freeing stuff is something that I rarely have to do in C++.
How?
Are you speaking of C++.Net?
If you’re in the .Net world I stick with C#.
> Pretty much the only language taught in CS at my university
> (apart from SQL) is Java.
Hopefully, what you meant by that was, “you’re supposed to just pick up the other languages as-needed, since many classes make you use all sorts of different languages”.
If you didn’t mean that, you might consider transferring to a different university (if you’re not already too far along in your program). CS != Java, of course.
Personally, I found C++ a little too labyrinthine and “designed-by-committee” for me. It takes a long time to master C++; there are many dark corners. I remember Bjarne himself writing something like, (paraphrasing) “there’s a smaller, cleaner language inside C++ waiting to get out”. I thought maybe that language could be “D” ( http://www.digitalmars.com/d/index.html ), but besides taking away, D also seems to add stuff as well (not sure of the details, haven’t looked into it in a while). (Also would’ve liked to see Walter GPL his compiler, but that’s another topic.)
I remember when folks thought Java might be that smaller, cleaner language, but it has its warts as well (not to mention it’s just so darn verbose). Plus, of course, you’ve got Sun running the show in that space.
Python is neat, though from my novice perspective it seems like a pain how *everything* has to be an object. Modules are objects, classes are objects, functions are objects. Ugh.
Never tried lisp, ocaml, haskell, scheme, ada, or eiffel. Guess I should, but for now, Perl does pretty much what I need for the small stuff I work on (though I try not get into *it’s* dark corners if I don’t have to).
Sorry for all the hand-waving.
It’s not hard to believe that C++ has declined.
Microsoft abandonded it when they deadended the MFC framework. Java was hot and Microsoft walked away from C++ and MFC, primarily because the C coders at Microsoft got tired of wrapping their api’s in classes.
So, everyone that wanted to be productive, moved to Java.
Hopefully, what you meant by that was, “you’re supposed to just pick up the other languages as-needed, since many classes make you use all sorts of different languages”.
If you mean that, you might consider transferring to a different university (if you’re not already too far along in your program). CS != Java, of course.
Very well stated. My school taught me C++ in the first term of the first year. For everything else it was expected we’d pick it up (except Prolog…don’t get me started). I’m just finishing up my degree now, and I’ve coded in C++, C, Java, C#, Python, Perl, and any variety of shells. You’ve seen one, you’ve seen ’em all. It’s just a matter of getting to know the subtleties of a language.
Myself, I think C++ is a great starting point. It teaches procedural programming through its C-like syntax, and it also teaches the object-oriented metaphor through use of classes. It teaches the concept of pointers vs values too, which is something that can’t be said for Java unless you’re teaching people about how Java works, not using Java as a tool to convey algorithms.
Regardless of what you start with, if you go to a half decent school you’ll be well versed in a variety of languages that reside at all levels of the computer…you’ll do some work on the bare metal, you’ll work on the OS a bit, write some apps on top of the OS, and do some work with distributed systems. This is the nature of a good school program…it’s language agnostic and teaches a good overview of computing.
>Facts are facts: no other language does anything that cannot also be accomplished cleanly and robustly in C++. And yes, I’m aware you can say the same thing about C. And Java. And C#. And assembly. In the end, these programming language pissing contests are asinine.
Yet people keep writing bash/perl scripts, and makefiles, when a quick and dirty C++ program would do.
> Unless you’re talking about LISP or COBOL. They just suck.
LISP definetely sucks. I mean, those punch cards are ancient history… Common Lisp on the other hand doesn’t. (Yes, it does support multiple inheritance)
Sorry, couldn’t resist.
My current project requires me to program in Java. I just can not stand its slowness, awkwardness and inflexibility in many ways. I still love C++.
It is said platform independency is a main advantage of Java. But I do not think so. At least, platform independency makes Java running slow in EVERY platform. I also feel sick about Java’s look and feel. Platform independency makes it unnative and unwelcome.
I am not quite familiar with C#. But I guess it should be more efficient than Java under windows. That is enough since more than 80% desktops are running windows applications now.
C++ will definitely continue to be the mainstream language as far as OO programming is concerned. It will be replaced some time when a new software design pattern(model) is out. But I am sure it will never be replaced by C# or Java. Java is dying on the client side programming.
I like coding! It doesn’t matter wich language I code in, but I’m sad about all these flames. I think people that are coding should not going nuts on the languages, keep coding.
The only thing that is a problem for me is what environment I should run…and linux is the only one env for me
Perfect platform for coding..for me. But maybe not for you.
“How?
Are you speaking of C++.Net?
If you’re in the .Net world I stick with C#. ”
Smart pointers, automatic refernece counting.
Java is dying on the client side programming.
i think client side java is just starting to take off! just have a look at all the neat stuff avaialble and being implemented oh and JAVA WEB START is a great way (or at least the idea) to distribute software!