

Java To Overtake C/C++ in 2002 605
jarek writes "ZDNET has an article that talks about latest research data.
It talks about how Java is overtaking C/C++ next year. The article also talks about developers adopting linux and putting linux to use in mission critical tasks." It's evidently taking developers from the C/C++, but also the Visual Basic camps, with strong growth overseas.
Speed, Visual Basic, etc. (Score:2)
1. C and C++ are already minority languages, in that they are only used for a smallish percentage of applications. Yes, kernels and spreadsheets and games and paint programs are written in C and C++, but these are dwarfed by so-called enterprise applications written in Visual Basic, Delphi, PHP, and so on.
2. Let's suppose that Java really is slow, ignoring any improvements that have been made in Java run-time performance over the years. Back in 1996, when people said Java was slow, they were talking about software on a Pentium 133. When a 333MHz Pentium II was top of the line a few years later, people still said Java was slow. Ditto for the 600MHz Pentium III, the 900MHz Athlon, and the 1.7GHz Pentium IV. Even if it's slow relative to C++, we're still talking about a 10x speedup in raw horsepower.
3. Realistically, the issue with Java has always been "exactly how does this benefit me, the programmer." It's easier than C++, yes, but it's still in the same general ballpark. And there's been the slowly growing feeling that forcing everything into an object oriented framework is not the panacea it was once thought to be. Java may be too OO for it's own good.
"Overtake"? (Score:4, Interesting)
I think we can make a pretty good case that right around the same time, three toolkits came into existance, the Java widget set (SWING, I believe), Gtk+ and Qt. I notice that 99% of the apps on my Windows desktop are the old C++-based MFC widgets, and my Linux desktop is split between Qt and Gtk+. I never see a Java app unless it's the back-end technology for a Web site (but, more often that's PHP, Perl, Python or VB).
So, from whence comes this figure?
Well, most of it is based on the growth of Java as a wizzy buzz-language in the dot-com startup arena 1-2 years ago. Some of it is based on the fact that in the financial market, in-house apps are very often written in Java because it's something they can hire hordes of programmers to write, and it keeps them happy because their skill-sets are current. Remember, these are the folks that bought WAY into COBOL....
Java's a cool language, and I actually think it puts C++ to shame in terms of the cleanliness of its OO system, but it's just not useable for most of the large-scale development out there (can you imagine how much slower Mozilla or GCC would be if they were written in Java?)
C will continue to be the right language to choose, but C++ will continue to be chosen a large percentage of the time because people only think about the performance of critical sections not the maintainability or cleanliness of development.
Troll? No, just firm opinions that I have formed over the last 10 years watching first C++ and then Java become the darling languages of the "if it's OO it's good" programming set (not that the converse is true either....)
The /. future tellers????? (Score:3, Interesting)
Re:The /. future tellers????? (Score:2)
Slashdot's community is a composed of many people "in-the-know" and in positions, allowing for both accurate analysis of technical issues and influencing (somewhat anyway) technical decisions.
Kinda reminds me of the Matrix, when Neo goes to see the Oracle and knocks over the vase.
Hmm... those distro numbers are interesting... (Score:2, Interesting)
Ok, so 77.2 + 21.8 + 21.4 + 20.4 = 140.8% ? I guess in the survey folks could respond with more than one choice for their distro, but I'm still surprised that there are *that* many people out there using more than one for their Web servers.
Ugh, so much Java mythology... (Score:3, Flamebait)
Java is so slow.
Yet no one here ever complains about the slowness of PHP, Python, bash, etc. -- scripting languages that are almost by definition slower than Java in most circumstances. Why does the speed complaint only get leveled against Java?
The point is that, much like PHP, Java is plenty fast enough for what people use it for. I use it for web application development, and the performance is more that just acceptable. It's lightning fast. I think this perception is fostered by the ancient JVMs that ship with Windows and IE, which are major releases behind the current state of the art.
No one uses Java for GUI app development.
LimeWire [limewire.com], which IMHO is the best Gnutella client out there, is pure Java. It's very responsive, feature rich, stable, and less than 1MB, about the same size as XMMS. Hardly what you'd call slow bloatware, which is the usual complaint.
Sun owns Java. Java isn't free.
I could mention Tomcat [apache.org], which is open source and which we use in production where I work. But then someone could complain that the JVM we're running it on is still proprietary to Sun...
Haven't any of you heard of Kaffe [kaffe.org], GCJ [gnu.org], or GNU CLASSPATH [gnu.org]? None of these things are what I would consider production-grade yet, but the point is, Java is only as closed as people want it to be. If you don't like the fact that the best JVMs are all proprietary, then by all means, contribute to one of the many free Java projects out there!
Get past the myths. Java won't solve every programming problem, but if you don't like it, at least complain about the parts that *do* suck (like java.io.* :)
Q
True, to an certain extent (Score:5, Informative)
However, C and C++ will remain very important, for example for system programming. A lot of Unices, MacOS and Windows are built on these two languages. Component, object and application frameworks like MFC, KDE, QT are written in them. A very large application base is written in them and it will not be replaced overnight.
I don't think Java will ever completely take over C/C++, simply because the hardware accessibility just isn't in Java and you need it when programming an OS.
But when building a new application, Java is more often than not a better choice than C/C++, simple because it was build with networking in mind.
Re:True, to an certain extent (Score:2)
Yes, but that's simply because it lacks the libraries for it. There's nothing keeping Java from having those libraries, either; it can work just as well as target-system-compiled code as byte-compiled code.
Not just the libraries . . . (Score:2)
Re:True, to an certain extent (Score:4, Insightful)
Re:True, to an certain extent (Score:2)
Unfortunately, gcj still doesn't support AWT so that "only" command line programs can be created.
Re:True, to an certain extent (Score:2)
This is what I mean with 'networking in mind'.
Why Java will overtake C/C++ (Score:2, Insightful)
Cause, its:
- Skalable in Size
From Palm, Webbrowser, Applikation upto Server and the important interconectivity in between.
- Secure
The Sandbox restrictions seem to got forgoten, but thats exactly what is need for a lot of stuff nowdays to deploy basic secure applications in a browser, there is still no real alternative. Server based solutions never can do all tricks, cause good user interaction has to be programmed on client side. Well downloading and installing application or glued flash, javascript and server systems can't be the final solution, please ?
- Plattform independent
In fact it is a platform on its own. Whats missing is a Java OS (based on Linux and/or MacOs and/or Windows?) and off you go...
- Sophisticated, Huge and Clever APIs
They are getting better and better and more stable.
Try to connect to a database, do a 3D visualisation of the data and send an Email with the resulting picture
- Prospering in all directions
C/C++ is already dead a few years, it seem to have stopped at defining some cool but useless class keywords and a freaky "STL" ? On the oposite Java is not really pure Sun anymore nor IBM... its already a multifendor platform. Even Microsoft has smelled it a while ago and now tries to sneak in before it really hurts. Strange the Linux people continue flogging the dead horse, with basicly no real useable APIs for application development, trying to define there own ? A operating system is nothing without good APIs (and thats not just drag&drop and some windows, but also Printing, Audio, Video, 3D, Registry, Databases, Plugins, Components), what is missing for Linux, Java already has it ? But Unix has to be C right ?
- Skalable in Speed
Java VM is complete abstract, the language and the API (the main part of Java) are not realy tied to the VM
And plug in a second CPU and Java will make instant use of it... in my opinion there would be options to make JAVA CPUs that would outperforme every now available CPU by using multithread architekture in a single PU. Classic single CPU speed will get less scalable and to get out of the MHz drain multi instruction computing has to become more aware... guess which language has one of the best and most reliable multithreading programming architecture... even novices know how to programm a thread in Java... ever written more than one in C++ ? And got it synchronised succesfull ?
- Software Design
There are so many C/C++ design pitfalls (Header and Implementation seperation, Pointers, the quer STL, Operator overloading, Preprocessor and Macros overuse) that make software development a pain in the ass. Java has building blocks of software development and is extended only with features that are necessary and make sense.
- Complexity
Java has the power and the clearness to write and maintain applications off higher complexity. In my opinion many software projects (C/C++) are doomed to crash soon or later cause of there unmanagable complexity (the version 4.0 burn out
- Its allready #1 for a lot of things...
I know more people starting in Java than in C/C++. It is the language that is teached in scools and universities... cause one can get things done and not has to write a suitable String class nor learn the wired secrets of some oldscool APIs to popup a window.
something will overtake on the left lain
Not that it will knock C/C++ from the street... but who is driving Assembler these days ?
The Right Tools for the Job (Score:3, Insightful)
"How many times do I have to tell you: Use the right tool for the right job!" -- Scotty, Chief Engineer, USS Enterprise.
Now where do I fall in a survey like this? After reading it, I conclude that the surveyors asked "Do you use Java?", not "Do you use Java exclusively?". I know lots of people who program C and C++ most of the time while employing Java and other languages as required. In the last month, I've written code in C++ (65%), Java (20%), Python (10%), and Fortran (%5). So I count as both a Java user and a C++ user.
What rattles my gourd is the way people get so defensive about their programming choices. Why do people get so worked up about one specific tool? I don't know any mechanics who argue whether a box wrench is better than a crescent -- they know that each tool has its uses, and they keep many different wrenches in their toolbox.
Sadly, the programming business is replete with dogmatic fools who insist that their language or their technology can do everything from counting sheep to curing cancer. And that's just plain dumb (or at best, willfully ignorant, the greatest of sins.)
A real software engineer uses the right tools for the job. Even Visual Basic is a useful tool, when it is applied to an appropriate task. The same thing holds true for C, C++, Java, COBOL, FORTRAN, Prolog, Lisp, and a myriad of technical tongues. We have all these different languages because different problems required different solutions.
Surely programmers can be as wise as mechanics... ;)
Re:The Right Tools for the Job (Score:2)
Hmmm. Let me see if I can take a stab at it. Maybe, just maybe, it has to do with the fact that it takes *years* to get really, really good at a programming language. Boasting college-age geeks aside, you simply can't master a language overnight.
You can bet your ass that if it took a mechanic years to become truly competent with a crescent wrench, he'd be trying to convince everybody that it was the best tool for every job. I don't see this as a remotely valid comparison.
I hear a lot of people spouting the "right tool for the job" argument, but I always argue that in the real world people can't simply dump everything they know and learn another language because it's 10% more efficient for a particular problem. Dropping, say, Java and moving to C++ would be every bit as big of an investment as most of you dropping Linux programming and moving to
Maybe if you never used anything but System.out.println()....
Specialization is for insects... (Score:3, Insightful)
The hallmark of an excellent programmer is the ability to learn and adapt. When I hire someone, I pay more attention to their attitude, creativity, and intelligence than I do to their list of "I knows". Certifications, degrees, and laundry lists don't necessarily impress me; capability and a willingness to learn always catches my interest. And anyone who comes in as a language bigot (or ignoramus) isn't going to be getting a check from me...
I might add that I've been quite successful in finding excellent talent.
As for mechanics -- well, I've spent enough time with gear heads and grease monkeys to know that working on mechanisms isn't something you pick up overnight.
Re:The Right Tools for the Job (Score:2)
The only theorem that I can postulate is that most of the (language) evangelists only know one language, and to rationalize it they try to put down other languages. Instead of "I do not use [language x] because I do not know the syntax" they say "I do not use [language x] because it is not as good as [lnaguage y] language". Ok, yes I am generalizing, but I am trying to figure out why there are so many people claiming that their language will be able to complete any and all tasks better. Maybe they are afraid that the other programmers thing is bigger.
-CrackElf
The library base and more (Score:5, Insightful)
Java does have it draw-backs, such as speed, but this is quickly becoming a non issue on modern computers. Of course computationally intensive work will alway be done in C or C++ that can be compiled to take full advantage of the processor. Another draw-back is that it is very difficult to take full advantage of the underlying OS without writing code using JNI, and thus loosing some protability.
Yes I am very much pro Java, though I also realise that it can't do everything. It will always be a question of the best tool for the job.
Re:The library base and more (Score:3, Interesting)
When learning Java 3 yrs ago, one thing attracted me imeediatly was the availability of data structures. (Vector / Hashmaps / RedBlackTree / Sets...). Before that when doing my C/C++ I already had a home brew Vector/Hashmap stuff which I used. The fact it is already in the lanaguage distribution and well tested was a huge win.
- HOw many times you have pulled your hair in debugging a double linked list (don't tell me you haven't, every C programmer goes through this religiously)
- you would have atleast try to implement a String class once in your lifetime for C++ (a very good learning experience!, and very good way to get confused about = operators and overloaded functions)
At that time, STL wasn't even available to me (gcc / Irix) nor it was encouraged by university for projects. b/c what compiles on your IRiX machine might not compile on the solaris build machine & vice versa.
I thought this is where C++ lagged, an industry standard language coming out with no 'utils' available. Sure I know there are StingRay & tools++. But still nothing beats the feeling of these being readily available.
Right now I am using a Cayenne libs for Hashtable in C++ and having 'fun' getting it to compile on Solaris. SOme of their header files are 'plain stupid' and won't compile with sun CC 5.0.
So far if I want to develop an opensource gui application for Win & Linux, my only choice was Java. b/c I can give them a JAR file and it would just work. Now that QT made available free for windows for opensource programs I'd look at it again.
THis is not a C++/Java flame. I am merely saying that Java language designers did it right & learnt from C++ and academia.
LinuxLover
Re:Java lacks genericity... (Score:3, Funny)
2. having to use arrays like this because references don't exist brings up a whole bunch more problems because not only can people mistakenly swap different types of object, they can pass wrong sized arrays.
3. compile time checking is better than runtime checking, a *real-life* example would have to come from a large program so I can't be bothered, but the fact remains that this kind of programming encourages bugs.
4. your function won't work on int/float/boolean/etc because they are not derived from Object. Use a real OO language like smalltalk if you want single root done right.
Does anyone remember Assembly language? (Score:2, Insightful)
What you have to remember is that programmers are way more expensive than machines. If I can spend $5000 more on hardware and save myself $25,000 in salary costs, that is a pretty good investment.
And of course this all is based on getting more powerful machines each year. There was a time when programmers really did have to agonize over using Assembler vs. C because memory was so tight.
There also was a time when we had to agonize over using C++ vs. Java, but that time has passed.
The rise of Java (or C# or one of the other new and improved languages) is inevitable. But if it is any comfort Java too will be replaced one day as soon as we can afford the next programmer productivity boost.
For all you C-ites out there (Score:2, Interesting)
*flashback*
Programmer 1: "Who would ever use C for applications/system design, I mean it's so much slower and bulkier than assembler."
Programmer 2: "Well it is more portable..."
Programmer 1: "To hell with your portability."
*Today*
Programmer 1: "Who would ever use Java for applications/system design, I mean it's so much slower and bulkier than assembler."
Programmer 2: "Well it is more portable..."
Programmer 1: "To hell with your portability."
C++ in decline (?) (Score:3, Insightful)
I recently read an article where Bjarne outlined many of the things he had on the C++ wishlist, which more or less were the steps to make C++ into Java.
Bjarne's opinion about /. (Score:2)
Grief, that's serious FUD you're spouting there.... but anyhow. After Dr. Stroustrup's interview here, there were lots of comments here on
Look on archives for comp.std.c++ on the 5th of June. Google allows you to search on message-id, but stupidly has no way to display the message-id of an article once you find it (making the searching capability almost useless).
Your post here seems to continue in the exact same vein.
FUD alert (Score:4, Informative)
Stroustrup's presentation notes can be found here [att.com] (PDF format). I invite anyone interested in knowing what he actually said to take a look. It certainly doesn't sound much like Java to me.
Java and templates (Score:2)
I totally agree with your comment about needing years of practice to become proficient in any language!
Java Quake, whatever.... (Score:2)
Not teaching proper C/C++ in college just means there will be fewer good programmers in the world and buggier applications as a result of hiring mediocre coders.
Re:Java Quake, whatever.... (Score:3, Interesting)
It's a port to Java of the Quake engine which was never completed because of pressure put on the developers by ID Software. When I first saw it a couple of years ago, I was quite impressed!
Java Quake, was shown at Quakecon (Score:3, Interesting)
It's called JAMID and was shown, to a much impressed crowd, at Quakecon last week.
(Quakecon is the ID sponsired yearly gathering and tournament of 1300 of the msot rabid Quake fans in the world.)
Obviously you missed it.
There's ben some recent discussion abotu it, with quotes from attendees to Quakecon and some ncie comments from Quakecon's organizer-- Evil John, over at Javagaming.org.
Its nice to know that we're a 'real language' now
C vs C++/Java (Score:4, Insightful)
There are two kinds of developments: those that need object oriented, and those that don't. If course the real distinction is always fuzzy. OO is not a universal method for everything, but it certainly proves its worth for a lot.
That said, I think the difficulty people will have in understanding the shift to Java is because of the continuing confusion of referring to C/C++ together as if it were one language. C and C++ are not the same language for any practical consideration. Sure, you can write C and call it C++ and it will compile. But C++ is supposed to be something different than C, while giving you stuff C also has. But the distinction between the two kinds of developments mentioned above fall between C and C++. If you don't need OO for your project, then you write in C. Even if you compile it with a C++ compiler, it's still written as C.
I believe that Java is taking more from C++ than it is taking from C simply because more and more of those kinds of projects (applications) that need OO, do not need the facilities of C. While C++ has good abstractions, it's always been too easy to do it wrong and code like C. Java doesn't let you do that (as easily).
During the next economic boom cycle, more application projects will begin. Java will be more favored (if you believe all this, and I do). But that won't mean there will be a lot fewer things that need non-OO C ... there will just be a lot more new needs for which Java is an excellent choice. The thing is, those are projects that would not have been done in C anyway; they might have been done in C++ or one of those proprietary languages.
For me, the biggest reason I stay with C programming, as opposed to going with C++ (for some, not all, since not all projects I do would benefit from OO at the coding level) is because C++ is C with the pluses. While some certainly see that as an advantage, I don't. I see C++ as some kind of hack and fear that what I might have coded in C++ would still be tainted with too much C-ism. It's not the OO part I'm worried about; it's the C part.
I look forward to taking the plunge into Java. I'll skip C++. Some things will still be done in C. The big reason I have not done so before, or used some other strongly-OO language (like Smalltalk) is because the environments those languages work in have been too "academic". Look at the early hacks just to run Java programs to see what I am referring to. With advances like gcc support for the Java language (and Sun effectively losing pedantic control over it), I'll be able to fit a project developed in Java into a production environment more easily. These advances are shifting the line which determines whether a project benefits from using Java, and improves the margin in favor of OO where C++ wasn't enough to do it.
In summary, Java will take some from C, more from C++, and it will do this mostly in all new large scale projects for which it is far better suited. The gains will be seen more in percentages, rather than in absolute numbers.
Re:C vs C++/Java (Score:3, Informative)
Both C and Java are nice languages because they are small and are appropriate for particular tasks, roughly "low-level" and "high-level" applications. As a language, it seems that there is too much in C++ to be able to learn it well, and C++ tries to have it both ways. Garbage collection in particular is very nice to have for "high-level" programming because it removes one large set of "low-level" details to worry about (or at least, worry a lot less about it). Two more messy low-level details missing from Java are include files and make files. I think we can live without them for many programming tasks.
What about project size? (Score:4, Interesting)
That being said, unlike a lot of posters here, I don't see speed as being a permanent impediment to Java's growth. We're already at the point where some serious Java apps are fast enough for everyday use, and I expect that to be more true over time as a) hardware continues to get faster and b) OS support for Java gets faster and more integrated. Mac OS X does a truly beautiful job of integrating Java support into the OS (ironically, better than anything from Sun itself) and some Linux solutions aren't far behind.
And it's nice to hear that it's taking market share from VB. Java may never live up to Sun's early visions of taking over the desktop, but if it helps slow down or even stop the progression of VB/C#/.NET (and yes, I know these are three different things, but they're all clearly connected as elements of Kaiser Bill's Evil Plan) then that's a good thing.
Re:What about project size? (Score:2)
Dunno. The two Java projects that I'm very familiar with here at the lab were 50,000 lines of code (an online timesheet thingy that uses servlets, RMI, and JDBC), and Ganymede, which is about 250kLoc. Beyond that, I know I've seen some project boards up on the wall that show Swing graphics for database front ends and the like.
I always had the impression that Java was being used for custom application development, either web based or client-server. Java's "bondage and dominance" aspects make it better for large scale app development than for quick one-off stuff.
See Sun's Swing Sightings Page [sun.com] for a good overview of some more complex stuff being done in Java.
Re:What about project size? (Score:2)
Ahhhh... good way to put emphasis on C/C++, where development takes longer and you'll easily outweigh "developer hours" in Java!
Tally ho!
Java Servlets (Score:2)
Really these are just overblown CGI applications, but really shine when you're doing something like online reporting or database manipulation.
Re:Java Servlets (Score:3, Interesting)
No they aren't.
The last time I used CGI (which was many years ago), each CGI request required a new heavyweight process to be spawned. I don't think this has changed, but I could be wrong.
Servlets don't work that way. They are part of the same heavyweight process, and you don't need to keep re-instantiating them anyway. Session state is kept per connection, but you can have far fewer than N threads to manage N users.
A CGI written in C is almost certainly vastly slower than simiar code writen as a Java servlet. Deal with it.
-jon -jon
Re:Java Servlets (Score:2)
Uhh... when did I say anything about the speed of Java? Geez, you'd think Java coders would lose their martyr complexes when an article like this one has just been posted.
Servlets and CGI accomplish the same kinds of tasks for the same kinds of users on the same kinds of platforms.
Do they do it more efficiently? It depends entirely on who you ask or what environment you test under or even how you define 'efficient'.
Because they do exactly the same things, I don't think that I'm wrong in stating that a Java Servlet is 'the same thing' as a CGI application. Based on CGI and evolutionally advanced from it, certainly, but then so is PHP, which is arguably *not* CGI, although it can handle CGI tasks.
Welcome to FastCGI (Score:2)
A CGI written in C is almost certainly vastly slower than simiar code writen as a Java servlet. Deal with it.
Unless you use FastCGI [fastcgi.com] (supported by Apache with mod_fastcgi [fastcgi.com])... an extension to the CGI spec that, amongst other things, allows persistent processes. Being a simple extension to CGI, it's also completely language-agnostic and cares not whether you use threading, or, for the real gurus and speed demons, asynchronous programming.
Of course, if you want to lock yourself in to a vendor-controlled, language-specific server-side architecture, that's your business. Why limit yourself though?
Other languages and bytecode? (Score:2, Interesting)
Re:Other languages and bytecode? (Score:3, Informative)
Not to meantion that python is OO, and being Free Software will probably overtake Java in a couple years anyway. ;=)
Playing with statistics (Score:3, Insightful)
I can't help feeling a bit skeptical here. Who counts as "Developers using Sun Microsystems Inc.'s Java programming language"? I program Java, but I'm no expert. My professional work relies principally on C++, with odd bits of Perl or Python used on the project where they're convenient. Do I count as a "Java user"?
I suspect that the reality is that more programmers may now know Java, at least to a "competent" level. This is an inevitable result of the current trends in academia, and of course the hype of a couple of years ago. On the other hand, how many developers actually use Java as one of their primary languages is a different question, as is how much production code is actually developed using that language.
Reading between the lines of the article, I don't see anything to dispute this theory. And how can Java be rising "at the expense of" C, C++, VB and such anyway? Surely programmers who use these languages aren't just forgetting them in order to learn Java! This whole thing smacks of misleading statistics -- anyone know who sponsored the survey?
Sweet Fucking Christ (Score:5, Interesting)
Seriously, folks. Does one avoid taking this kind of study with a grain of salt simply because it supports a Slashdot Approved Technology?
If this had been a study sponsored by Microsoft presented at a Microsoft conference supporting Microsoft technologies, people would be gathering up the pitchforks and flaming torches.
Feel free to mod this down to the pits of Hell, but we both know it's true.
Programming for Business (Score:5, Interesting)
End of Rant.
And your point is? (Score:2, Insightful)
I take offense at the ignorance people display when they say that Java is finally fast enough for desktop use. That is simply not true. I use a number of Java applications on a daily basis, and even though I have a decently powerful machine it can only take so many bloated VMs before everything (everything) grinds to a fucking halt. And don't get me started on Swing. God, what a mess.
In my mind, the work I do as an enterprise software programmer is not real programming. You can do real stuff in Java, but I leave that to someone else. I'm looking to get away from Java completely. I can't stand the language.
Java as a teaching language (Score:4, Interesting)
Re:Java as a teaching language (Score:5, Insightful)
Then, an introductory course in C/C++ is given and a software engineering course in Java w/ Swing follows. Then you get a large course in plain C, and depending on the direction of your studies, you'll get one or more large courses using C, C++, Prolog, Miranda, Java, or whatever is best suited for the job.
I think the choice for Java for the introductory and software engineering stuff is great, because in these applications you don't want or need the low level stuff in which C is good.
Furthermore Java looks relatively 'clean' and is suited well to learn imperative as well as OO concepts.
Re:Java as a teaching language (Score:3, Insightful)
Back here in the real world, I work at a company with mixed C++/Java development. Primarily C++, with the Java teams (of which I am part) barely tolerated by the old-school management. Amazingly, despite the fact that our code performs better than C++ (true) and we are always far ahead of schedule while the C++ teams running into roadblock after roadblock (also true) we still have to continually justify our use of Java to the C++-loving managers. I also thought it was pretty funny how difficult it was for the C++ guys to upgrade from FreeBSD 2.6 to 4.0 while we can move between Windows and pretty much any flavor of Unix without even noticing.
I programmed in C++ for many years, and I thought it was a flaming piece of crap the entire time. I'm endlessly amused by opinions like yours that I'm somehow not a "real" programmer because I choose not to flagellate myself with the whips of dangling pointers, stack vs. heap allocation, ridiculous usage of overloaded operators, broken templates and exception handling, inexplicable linkage errors, and who-knows-what-else that I've managed to supress in my subconscious.
My question is: what don't you like about Java? I've coherently summarized my argument against C++, and believe me I can (as a past C++ developer) get into quite a bit more detail if I need to. What's your position against Java?
Re:Java as a teaching language (Score:3, Insightful)
To each her own, I guess...
Re:Java as a teaching language (Score:2)
That's already the case on the Computer Science AP in C++. Looking at samples of grades for the free-response section shows that students get 9 out of 9 points for code which wouldn't even compile. If they completely miss the concept they can get 6 out of 9.
The Computer Science AP was the easiest 5 I ever got - even though I was supposed to have studied their "Marine Biology Case Study" (wow, we can increment and decrement a variable and say that we're modeling the motion of one-dimensional discrete fish!) beforehand and I only first looked at it during the test.
Depends on your definition of "overtake".. (Score:5, Insightful)
The study cited in this article refers to the number of people with Java skills, not the number of programs released. To quote:
"Java usage is even stronger outside North America, with almost 60 percent of developers expecting to spend some part of their programming time using Java."
This is one of those misleading statistics, like "Half of all marriages end in divorce".. What most people fail to realize is that the statement is not factually concise.. There are idiot-men and idiot-women who get married and divorced several times, which accounts for a disproportionately high "overall" divorce rate. The percentage of successful marriages is actually much higher, just the same as the number of coders actively writing in C all the time is much higher than the number of coders actively writing in Java all the time.
Lame article.
In New York, java is already ahead of c++ (Score:2)
Re:Depends on your definition of "overtake".. (Score:2)
Them Jafa Beans (Score:4, Funny)
Gotta love that "research" (Score:4, Insightful)
I'm sorry but I tend to like my "research" with some sort of graph, and something a little "meatier" that a single percentage bar.
Going by Evans Data's "research" they might as well have used the results from a Slashdot poll.
office suite (Score:3, Informative)
Believe it or not, that's about to change. If you've ever seen IBM VisualAge environment, you should know that's written in Java. The window speed is just as fast as any office suite. I was surprised just how fast it was.
The people who wrote VA work for a company called OTI. The windowing kit they used was something proprietary and closed called JFace, but from what I understand, they are ready to release and open-source it to the public in the next few months, although the website is password protected right now.
Don't sell Java short. it's not system level programming, but it's hardly something to be dismissed as 'too slow'.
Re:really? (Score:2)
As for CD-Rs, that may be possible in Java, but there will probably be a lot of issues relating to hardware, breaking interoperability between OSs and hardware platforms. Perhaps some dynamically pluggable drivers implementing a common interface could do the trick to remedy that.
Re:really? (Score:3, Informative)
AltiVec's C API is the highest-level vector API I've used. It has unambiguous and standard C syntax extensions for vector operations. Yet, we still don't have C compilers that can automatically vectorize code. I'm having trouble imagining a Java tool that could automatically vectorize code where Java has no way to express vector operations.
Maybe you could write a Java DVD player that was the equivalent of cat /dev/dvd /dev/hardware-mpeg2-decoder-device, but that's about the extent of what you could do in today's Java.
Re:really? (Score:3, Informative)
Anyway, you can call C APIs from Java. So, yes you can write a DVD in Java, as much as you can write it in C! All the hardwork is done in assembler anyway...
There's probably nothing that C compilers do that can't be done by a Java VM. Some of the VMs use C backends anyway.
(Not that I'm claiming that current Java VMs are optimising for vector stuff, they may very well not be).
>I'm having trouble imagining a Java tool that could automatically
>vectorize code where Java has no way to express vector operations.
Well, Fortran can optimise vector stuff fairly well. If the VM spots similar structure in a Java program it may be able to implement the same optimisations. I'm sure the devil's in the details, but it's not impossible.
Re:really? (Score:2)
Re:really? (Score:2)
Nope. Check the top of the thread. That was HeUnique.
>even C++ is not fast enough for DVD decoding
C/C++ is fast enough for DVD when you supplement it with a decent vector library and some bitblt type of thing for writing to the screen. And the same is true of Java. Whether that counts as 'writing it in Java' or not, is of course arguable, but show me pretty much any program and I can show you some assembly in a standard library somewhere. (e.g. memcpy)
Re:really? (Score:2)
Yeah, it's a nuisance, but it's not rocket science.
Re:Not going to happen (Score:3, Insightful)
Are you going to see Quake IV in Java, probably not, but it doesn't have much to do with Java, as much as ID has a team of developers who know C.
If you want great games on Linux/Mac/FreeBSD/anything other than Windows, you guys better hope that people start to develop games in Java. We all know how well companies like Loki have turned out.
Lastly, Microsoft is fighting many a war on many fronts. ie.
1. Anti Trust Case
2. Palm vs. Pocket PC.
3. Sony, Nintendo vs. Xbox vs. PC games.
4. Java (Java2EE) vs.
5. Linux vs. Windows XP
6. Open source in general
7. Oracle vs. SQL server
8. AOL messaging vs. Microsoft
9. Star Office vs. Microsoft Office
10. OEM's vs Microsoft
and lastly Steve Balmer vs Heart Atack.
Microsoft has made many enemies over the last few years and they will never ever be able to crush out companies again. The government will see to that
Steve Michael
Quake (Score:2)
Too late (Score:2)
They tried the same maneuver with JavaScript, but it's still alive and well and I don't see much JScript around.
Jscript is the same thing as JavaScript (Score:2)
So, you do see a lot of JScript.
I think you meant VBScript, which, yeh, no one uses.
No. (Score:2)
This should shed some light on the differences between JScript and JavaScript:
JavaScript vs. JScript [javacats.com]
Re:Not going to happen (Score:2)
Re:Really ?? (Score:2)
C++'s power lies in its object oriented features, and particularly in templates. And this leads to the STL (Standard Template Library); no more writing and rewriting container classes, sort algorithms, etc.; you've got a whole set of well written, generic, tried and tested classes encapsulating all that for you.
assert(C != C++);
Re:Really ?? (Score:3, Interesting)
come here and hold me tight... oh you move me..."
Showing my age, but its so ncie to see someone blindly in love
For the record and FYI, the defintion of Java is controlled by the JCP, an open standards organization that anyone can join.
And the mafia shot kennedy.... (Score:2)
The JCP is repsonsible for the spec. The spec by definition has no bugs.
Various vendors license the spec and put out implementations. Each is responsible for ist own bugs.
Now doesn't that make more sense then martians are wathcing through your peephole? If not I have some preforssionals I can recommend to tyou.
Honestly, this kind of unsubstantiated and illogical raving is worthy of a poltiicain, but not slashdot. Or whoudl you rather I not confuse you with the facts?
Java and the embedded market (Score:2)
Re:I dont think so..... (Score:2, Insightful)
I can take your C app that is 100k and do it in machine code for around 5k. I have done this before just to prove it to people!
Time to scrap C! Oh yeah, your C app will take a heck of a lot more processor to run also.
Understand the argument?
Steve Michael
Network Architect
steve.michael@performancestrategies.com
Re:I dont think so..... (Score:2)
So yes, that clairifies my point to crystal clarity! thanks
Re:Really? (Score:3, Interesting)
Re:Really? (Score:2)
Want to tell that to these guys [passagen.se]
( http://hem.passagen.se/carebear/fragisland.htm )
Their FAQ is here [passagen.se]
( http://hem.passagen.se/carebear/faq.htm )
Re:Really? (Score:2, Informative)
Re:Really? (Score:3, Interesting)
An FPS in java is not a dumb idea at all; most of the performance in framerate is determined by the graphics drivers, and it wouldn't surprise me if the guts of that isn't assembly anyway- the game logic may have little to do with the frame rate.
Re:Really? (Score:2)
Think what the games were like 9 months ago. Not much different, by and large, from what they are now.
Re:Really? (Score:4, Insightful)
Re:Really? (Score:2)
Personally I was never hot on Java - it reminds me too much of Smalltalk. And listening to those OO purists always gave me a headache.
Re:Good-bye VB! (Score:2)
Re:Good-bye VB! (Score:2, Insightful)
When I use it, I feel it's constantly trying to constrain what I do. For example, it doesn't allow you to create controls dynamically (for example, if I want a variable number of controls on a form). (Yes, I probably could figure out how to do this using Windows APIs, but why?). You can't do multi-threading (well, there are hacks to allow this, but you can't debug programs!).
There are silly language options, such as Option Base, that can make understanding some else's code harder.
I also find the IDE very annoying. Undos often only work in the text editor. When a program crashes, it brings down the IDE, etc. Searching is a pain. You can't look at a form when running the program, etc.
I could go on, but the bottom line for me is that it's frustrating to use VB.
Re:Good-bye VB! (Score:2)
It's just another tool for Microsoft to exert it's evil power, and this more than enough for many.
Re:Good-bye VB! (Score:2, Informative)
My overall impression of VB is that language development is geared more toward PHB's who are looking for buzzwords than towards programmers. Case in point: OO inplementation. I remember my excitement when I heard that VB was finally going to implement inheritence, and my disappointment when I learned that by 'inheritence' they meant 'button to copy and rename an existing class'.
My biggest frustration with VB was that I kept running into walls, limits to the language that made it impossible to do what I wanted without some ugly kludges.
Re:I reckon the reasons are artistic (Score:2)
Science is all about finding the underlying beauty in the world.
No, science is about finding the underlying order in the world. Order may be considered beautiful, depending on the observer.
Java for high level, C for low (Score:2)
What's making Java so hot is not that it is a better systems programming language than C or C++. It clearly is not. What's making it hot is that operating systems, databases, graphics libraries (OpenGL, etc.), and many other high performance C/C++ code modules have been written which less performant Java code can run on top of. The high performance stuff runs with high performance, and the programmer who wants to build something new gets a safe, productive, and reliable programming environment, without having to worry overly much about where their code is going to be deployed.
Everyone wins. And, of course, the people writing the high performance foundational modules are likely to be fewer than those writing applications on top of them, just as there are far fewer Linux kernel hackers than there are programmers writing code for deployment on Linux. So, from that perspective, I can see C and C++ receding somewhat in dominance.
The same thing's been happening in UNIX for the last 10 years with Perl, Python, and Tcl/Tk.
But what is "speed"? (Score:3, Informative)
I know plenty of developers that like Java simply because it's easy to program and you can roll out applications relatively quickly when compared to C++. Now I know that statement is opinion and everyone has an opinion, but saying that Java is slow is misinfomed. Given that applications are so network-centric these days, Java can truly shine in a server environment where the resources are plenty.
But to be honest, comparing these two languages is not fair. Here is a good article [ibiblio.org] on why they are apples an oranges
it's about cost, not performance (Score:3, Insightful)
Swing is not lightweight but given a decent PC it will run. In fact all development tools I use are written in Java and I'm not complaining about performance. I'm sorry I can't show you a java program that is faster than the C++ version. However most java applications I could show today, you would still be in development if they were written in C++. That's why java is picking up, you get things done in it.
That's also why Java became popular on the server first. Typically server software is "one of a kind" meaning that each month spent on developing the app adds to the cost. If you have a small development team of say 5 persons costing about 5K $ (good luck finding them that cheap) and you can save 1 month that translates into a lot of hardware. Java development is generally seen as somewhat faster than C++ development so that translates into huge savings on one of a kind software development. Also Java is very scalable, it literally can run on anything from a credit card to a mainframe, so if you have a performance problem, throwing more hardware at it will likely make it go away. And since you develop faster you have something extra to spend. That's why many people creating server software have adopted Java. It works, it works reasonably fast and it scales nicely.
Re:it's about cost, not performance (Score:3, Insightful)
This is actually a poor example - please spend some time studying n-tiered architechure.
In such an application, the bottleneck will likely be the Database server, and the speed at which it can perform table updates. The second bottleneck will likely be the network. The C++ or Java business layer will likely spend most of its time in a 'wait' state, waiting for the network or dataset results.
-jerdenn
Re:I can't buy what you're selling (Score:2)
Re:Less Visual Basic Programmers (Score:5, Insightful)
On a second thought, Java _was_ wildly popular among many of the dotbombs. Possibly the study is based too heavily on that time period. Does it still hold it's proportion of growth, or are IT shops, like us, drifting toward VB and other M$ development languages/suites?
Re:Less Visual Basic Programmers (Score:2)
Microsoft = Worst manuals, ever! They're really of any use once you've gone through some of the better IDG publications and have an idea what tool you're really going to need for the application, as some manuals are organized by alpha, and have no index at all (e.g. Microsoft Visual Basic 6.0 Language Reference)
IMHO, the best first book for VB is O'Reilly's VB in a Nutshell, if you care to even learn the language. The M$ books are matches of what comes with the online help, and it's ok for some things, but the depth just isn't there. I've coded for over 20 years in a dozen languages and have some pretty definite ideas of my approach to a problem, when I can't get it to work in the language and the help only goes so far I hit msdn, pbdr.com [pbdr.com], vbnet [mvps.org], and anything else I can find with Google. Ultimately, for sophisticated code, VB is just plain weak. Nice visual interface and builder, but the language should have died at Quick Basic.
As far as the code-less application, yeah, try to do any _real_ database work that way. Foo.
Re:Less Visual Basic Programmers (Score:2)
Seen bad java code, too. Worst example was an entire app written as one method within one try-catch. Sad.
Re:One more misconception to fix (Score:2)
And you've never seen bqd C programs? bad coders can make crap in any langauge my friend.
But as you've clearly stated you'ld rather look at bad Java programs then good ones I think you've just absolutely established that you are one fo those who "want to keep their illusions."
Enjoy them. As a human you are entitled to them.
Catseye
"You can laead a horse to water, but you can't make him think."
Re:language wars (Score:2)
If you restrict yourself to programming in a single language, that might be the case. I don't. I've been programming in C for nearly 20 years. I had programmed in assembly for 20 years with 13 of those years overlapped with C. I program in PHP today, and have been waiting for Java to make it to serious production capability (I think I see the light at the end of the tunnel now). If someone programs in only one language today, they might well still be programming in it in 10 years, but may also be programming in one or two other languages (to the extent they have the freedom to choose the language that is best for the project, as opposed to having it dictated by a committee of PHBs).
You're hearing wrong (Score:2)
Thats the message.
Try this article...
http://www.aceshardware.com/Spades/read.php?art
Killer application effect (Score:4, Insightful)
Notice that those are all huge downloads.
Also, some comercial software will simply ship the JRE and install it from CD.
Java is more than you think... (Score:3, Interesting)
Yes, you missed the point. First, the VM based versions of Java (using adaptive compilation as opposed to simple interpretation) are now very competitive with C++ speedwise. Sometimes slower, sometimes faster with usually a fairly small delta.
C is generally more efficient, but you lose object orientation.
Finally, there are traditional ahead-of-time compilers for Java like gcj [gnu.org] (which shipped with gcc 3.0).
Java is well suited to a large percentage of programming tasks. For those areas where its not appropriate it can (fairly;) easily call C/C++.
Java is open, productive, fast, cross-platform, widely taught, supported by every significant software company, and somewhat future-proof. What other language/platform comes close?
The real proof will be forthcoming - when many anti-Java Luddites are in the unemployment lines, still complaining about it... ;-)
186,282 mi/s...not just a good idea, its the law!
Re:Java Portable Apps? (Score:3, Informative)
Processor power is up, and cheap. Architecture isn't standard. Write a VM once for an architecture, then you can run all your pretty PDA Java applications irregardless of what you're running them on. You're suggesting that every portable-item have all of its applications coded specifically for it. Even if the only games in the world were solitaire and nibbles, that's a lot of applications to re-write everytime a new device comes out with a slightly different architecture/instruction-set/whatever.
Oh yeah, and Java is a buzz-word. Makes people happy when they have a buzzword-compliant item. The toys just seem so much COOLER then.
Re:Actually, if you think about it (Score:3, Insightful)
After programming in C++ and Java each for several years, I can only say that C++ is the more complicated of the two. I do not like using Swing (Java's standard GUI components), but I haven't tried them for just over two years now, and it may now be much improved. For the server-side work I do now, Java beats C++ hands down for ease of use.
All of the following and more make Java simpler, though they cost a little bit in flexiblity and speed. However, server-side Java (forget about Swing and how slow it is) performs quite well for me. Today's PCs seem to do a good job running Java. I've been pleasantly surprised by just how much better JIT was over non-JIT and again by how much better Sun's Hotspot JVM and IBM's JVM are than earlier JIT JVMs. Special hardware might be useful for embeded devices, but mainstream CPUs work quite well for server applications.
end of line