Java To Overtake C/C++ in 2002
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.
I didn't make the example, you did :) You said that DVD can be done in Java because Java is as fast as C++ for computation. I'm telling you that while justifaction may be true, the conclusion is not: even C++ is not fast enough for DVD decoding.
It might be high on Microsoft's priority list, but there isn't a damn thing they can do about it. The only thing that I hear Microsoft say about Java is "Have you seen C#?" Wow! What an awesome comeback! The speed of Java use to be an issue, but it isn't anymore. The same people who use to say that C was way too slow (compared to Assembly), are the same people that say Java is too slow. It took C around 5 years to get fast and reliable and it has taken Java around the same.
.Net
:-) I hope they bundle a bunch of stuff in XP and release it early... it will make the case that much stronger...
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
The more I learn about science, the more my faith in God increases.
In my university (vrije universiteit in Amsterdam) you get an introductory course in programming in Java, then a datastructures course in Java and a course in x86 assembly.
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.
Some comments on other comments:
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.
If you like the Java language for development (as I do), but don't care for the multiplatform use of bytecode, the latest version of the GNU compiler can now compile Java code into native code.
Unfortunately, gcj still doesn't support AWT so that "only" command line programs can be created.
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.
The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
The word overtake is questionable here. Do we mean that more developers will be using it (that's what they mean), or that all that the tasks that those languages have previously been put to will be done in Java?
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....)
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++);
yes I do! and that is the point. you cant replace a tool that fits in tiny places and shovel in a monster and call it a solution (Embedded NT comes to mind here) Assembly has it's place and is the most powerful language there is. Sadly we have very few that can write assembly as they are only tought Java and other bloat-languages (VB for example)
:-)
So yes, that clairifies my point to crystal clarity! thanks
Do not look at laser with remaining good eye.
Looks like /. can predict the future. A few weeks ago in
this article
the /. community discussed java as a good CS Introductory language and the
post went on with a lot of people talking about java taking over as a main
language. Just shows that if you want to know what the IT world has going
on, look at what the IT people have to say.
"If ignorance is bliss, why aren't there more happy people in the world?"
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.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
Java (with a decent VM) is faster than that. The hit is only 30-50%. That's about 9 months of Moores Law.
Think what the games were like 9 months ago. Not much different, by and large, from what they are now.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"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.
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.
I go between C++ and VB all the time. I hate working with VB. Why?
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.
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.
http://saveie6.com/
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.
Win dain a lotica, en vai tu ri silota
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.
A CGI written in C is almost certainly vastly slower than simiar code writen as a Java servlet. Deal with it.
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.
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
Java is fun and all, and usefull in web aps, but face it, you cant write an FPS in java, and you cant really write a java kernel. The language is useful in certain things, but if you need performance, you have to go more low level, like C/C++ or assembly.
Welcome to my land of make believe.
I'm quite aware of what JavaScript, JScript, and VBScript are, having coded in all three. I can guarantee that, despite some shared ideas, they are significantly different. In an attempt to steer the crowd in their direction, Microsoft created their own spec with the name being made similar only to confuse people (which has apparently worked :).
This should shed some light on the differences between JScript and JavaScript:
JavaScript vs. JScript
>You'd have to write the program such that it generates no garbage at all
Yeah, it's a nuisance, but it's not rocket science.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"But if they reported it that way, it wouldn't be newsworthy, would it? The media are not there to report the facts, they're there to attract readers so they can keep making money.
Donate background CPU time to fight cancer.
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.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Nope. I have to endure JBuilder in my daily work (yes I'm a suffering java developer who couldn't get a decent C++ gig). JBuilder is NOT acceptable by any stretch of imagination. Any application that takes 40 seconds to launch on a 800MHz PIII has serious performance issues. And it's full of bugs too lest we forget.
Your pizza just the way you ought to have it.
>I didn't make the example, you did :)
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)
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"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, 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, 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, GCJ, or GNU CLASSPATH? 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
Um. AltiVec's C API is presumably coded in assembler. So you can't do really fast DVD in pure C either.
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.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"Actualy, John Carmack was thinking of putting a JVM into quake to handle scripting, but later decided to go with plain C because he was worried about support issues of using more extermal technology.
ReadThe ReflectionEngine, a cyberpunk style n
Simply because it's a Microsoft product duh !
It's just another tool for Microsoft to exert it's evil power, and this more than enough for many.
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, vbnet, 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.
A feeling of having made the same mistake before: Deja Foobar
With JIT compilers becoming faster and faster, and the paradigm shift of user applications from autonomous programs to web applications, Java is becoming more important.
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.
Cause Java is developed for the future it has HUGE potential to put all this hacking, rewritting, glueing, reinterfacing, rewritting called "programming" at least one tiny step further towards software development.
... go figure in any other language with any set of API(s).
... it could be redefined any time and the current VM is hopefully not the last in compiler technology, especially Software/Hardware hybrids (like Cruso) can make a lot more out of it... well a lot more than out of the 25 year old intel instruction set.
;)) ... if the core concept of the project is not good it will wash out and get riddled... Java has a good core concept and at least the programmer is not responsible to rewrite basic functions if there is a new OS or bullshit API that thinks it has to reinvent the well more round.
... watch it fly by !
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 ?
"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... ;)
All about me
Oh I see.
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."
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.
You mean something like this?
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!
You can accomplish anything you set your mind to. The impossible just takes a little longer.
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 for a good overview of some more complex stuff being done in Java.
- jon
Ganymede, a GPL'ed metadirectory for UNIX
Java is getting stronger and stronger on the embedded market. EmbeddedJava and PersonalJava are the appropriate environments for that. Of course they don't need 3 megs. Jbed and the like start with a memory footprint of about 8 KB.
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.
> but face it, you cant write an FPS in java,
Want to tell that to these guys
( http://hem.passagen.se/carebear/fragisland.htm )
Their FAQ is here
( http://hem.passagen.se/carebear/faq.htm )
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).
now we need to go OSS in diesel cars
Thanks for the vote of java Support.
:)
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
JScript is the same thing as JavaScript. No one is allowed to call anything Java* except sun, (and apperantly netscape with JavaScript), so MS calls it's JavaScript implementation JScript.
So, you do see a lot of JScript.
I think you meant VBScript, which, yeh, no one uses.
ReadThe ReflectionEngine, a cyberpunk style n
MS aside- why the animosity for VB. I see it all the time, but I never see any reasons. I work with VB every day. I don't understand why it is held in such great contempt.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
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.
Jumpstart the tartan drive.
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 (supported by Apache with mod_fastcgi)... 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?
For example, lets say we have a 600 Gig database of items that we want to run price changes on. The Java app can get it done but, it takes 13 hours. Meanwhile, the C++ app gets it done in 8 hours. This app will likely be around for years to come and it will run every night. So which is the better business choice?
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
Java will have proper generics support in 1.5 (admittedly years off still). Until then using interfaces and generic object support you can get pretty much anything you want done in the same style as templates - witness the excellent Collections package in Java witch is far easier to use than the C++ STL, and provides you with 99% of you collection needs.
I totally agree with your comment about needing years of practice to become proficient in any language!
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Modern Java is C equivalent in speed.
i cl e_id=153
Thats the message.
Try this article...
http://www.aceshardware.com/Spades/read.php?art
When I first started programming, there was a raging argument about one language that was super efficient, but a bit hard to program vs. this other language that was not quite as efficient but much easier to program in. Sound familiar? The languages in question were Assember vs. C. I also saw the same arguments with C vs. C++.
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.
Microsoft has been trying for years to get rid of Java. Just like Microsoft itself, it's easier to get rid of a standard before it becomes mainstream.
They tried the same maneuver with JavaScript, but it's still alive and well and I don't see much JScript around.
Highly improbable, most of people I know who have tried or who are programming in Java are simply in love with it, and nobody will be able to change that even the Almighty Microsoft. Also Java (and Linux for that matter) is very popular in university as a programming teaching language at least in Europe. Micorosoft is able to change many things but not those kind of things. What we often tend to forget is that they are mere mortal and not god :)
A normal user will install Java for the same reason they will install Real, QuickTime, etc. To see some content, to use an application.
Notice that those are all huge downloads.
Also, some comercial software will simply ship the JRE and install it from CD.
Developer hours, though harder to measure, would probably provide a more meaningful representation of how "big" a language has become.
Ahhhh... good way to put emphasis on C/C++, where development takes longer and you'll easily outweigh "developer hours" in Java!
Tally ho!
"And like that
can't write an FPS in java, eh? so what do you call the quake clone done by the team at fullsail? it was shown at quakecon just last week and was received very well from what i've heard. see javagaming.org for more info. - danboo
if you wanna talk speed...
*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."
Remove *your pants* to send me email.
Lets see.
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
The more I learn about science, the more my faith in God increases.
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.
Whatever. When you can write an FPS game in Java then it will be a real language. Otherwise it will forever be an academic tutorial, just like Pascal, or a langauge for quick hacks, like Perl.
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.
https://www.accountkiller.com/removal-requested
Explain to me exactly and with what mechanism the JCP "Quashes bug reports?"
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?
C also has better facilities for bit-twiddling, and mixing itself with assembler than Java does.
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
"C... i think I love you... but I want to know for sure...
:)
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.
Seen bad java code, too. Worst example was an entire app written as one method within one try-catch. Sad.
A feeling of having made the same mistake before: Deja Foobar
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.
now we need to go OSS in diesel cars
I don't see number of developers as being all that meaningful a measurement. I'd guess that the vast bulk of Java development is for relatively small applets and servelets, and since that sort of programming is considerably easier than serious application and OS development, the bar for being a Java developer is lower than for being a C/C++ developer. Developer hours, though harder to measure, would probably provide a more meaningful representation of how "big" a language has become.
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.
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
While I personally dislike Java, I think one of the reasons it's doing so well is the ability to create Java servelets on almost all platforms.
Really these are just overblown CGI applications, but really shine when you're doing something like online reporting or database manipulation.
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
The bytecode idea is a really good one, especially with the large (although shrinking) number of platforms you have to support these days, and the possible rise of VLIW processors on the horizon. I don't really like coding in Java all that much, though. Is anyone working on a compiler for another language that compiles to bytecode that will run on a JVM (rather than a internet-c or c# vm)?
Narrative
To each her own, I guess...
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?
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Because, first off you obviously don't WANT to find them since I told you were to look for 3 good examples.
Here's another, a very sophisticated UML tool -- IMO better then Rational's Rose.
www.together.com
DVD can be done. Java is actually as fast as C++ for numeric intensive applications such as that.
CD-R is quite doable in Java if you code it carefully; you don't get garbage collection pauses if you don't generate any garbage...
Java isn't you're fathers Java any longer, it's not quite as fast as C++, by and large, but it's often within a small percentage; and with current processor speeds, but mostly who cares about even a 50% hit?
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"JAMID has been favorably compared to Quake2/Unreal by EvilJohn, the organizer of Quakecon. (You can see the comments at javagaming.org).
And it was written in 1 month by 3 guys.
How long did Quake 2 and Unreal take to write in C?
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 (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!
Galileo: "The Earth revolves around the Sun!"
Score: -1 100% Flamebait
Hardware designed to run Java seems to run it fine and with a huge amount of speed increase over normal pc hardware.. By that line of thought, all that needs to happen is for SUN to get with the hardware mfgs, spread around a little bonus money , and get them to better support java apps. Java's a little complicated to program in, I'll admit I tried it, didn't like it, but I'm a little cpp biased.
Are YOU listed?
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"Someone forgot to moderate the article as Flamebait...
Nevrar
So Microsoft is not including support for Java in .Net and Windows XP. Isn't that interesting? You'd think that a language, soon to be used by 60% of developers, would be worth supporting. I mean if they are not going to support Java, why are they supporting C++? I mean less people are using that, so why support that if you won't support Java?
Of course it's real simple, C++ doesn't threaten Microsoft's monopoly. They'll even support perl because they don't see it as a threat. It's certainly not that Perl has some broader base of developers.
This sig has been temporarily disconnected or is no longer in service
Stroustrup's presentation notes can be found here (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.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Well I guess it depends on how you measure "speed". Do you mean perfomance time related to the application itself or do you mean time to market? Which is more expensive for a company - hardware or humans? The human cost is often overlooked when we speak of how "speed is of the essence".
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 on why they are apples an oranges
There's no margin of error quoted so this is obviously not a scientifically valid survey.
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.
Look at all those OS kernels and low level software. Is there there any way that Linus will throw away his kernel for a Java replacement?
Ok, I hear your arguments. But it is not about choice of language. It's about choice of model.
In C, you're developing in structured programming model. In C++ you're developing for object oriented programming model. C is the best known language in its model. It has easily killed BASIC, PASCAL or any other competitior. And Java is a very strong language in its arena it seems like it will be able to kill C++ in a year (as the article says) and any other competitor (Smalltalk, ObjectPascal) is already out of the way.
But until we change the way this machines operate object oriented model will not dominate. Thus in a few years we may see KDE replaced with Java version. But it's unlikely to see Linux replaced by JOS (http://www.jos.org) in even twice that period.
If MS writes good documentation then they can't charge you $$$$ for training seminars. C'mon, the poor guys only made something like a measly $25 billion last year. You can't expect them to make enough money by simply screwing you on the OS and the IDE.
I don't know about CD-R or DVD (though I suspect most limitations consist of the lack of a hardware speaking interface in Java), but with the Office suite comment, you are refering to the lack of a fast windowing toolkit for Java.
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'.
I was thinking of how to intentionally fail my drug test... It would make a good memoir story someday.
This isn't a sign of the superiority of Java or the inferiority of C++. It's just a sign that C++ is way overextended, from the systems and large applications realms into the realm of multi-tiered applications with database backends. There, efficiency and bend-over-backward flexibility are much less important than fully featured libraries and short development cycles are much more important. I'm surprised that VB is suffering, though. That's a product with a place where it is clearly the best. In my Perl niche, I can feel Java squeezing in at times, but I'm pretty safe. C++ still has way too much of the market for me to worry.
Even Slashdot wants to hide some things
Keep in mind that Slashdot is bastion of C/C++ hackers who really don't want their skills obsoleted.
:)
It is easier to light one candle then curse the darkness, but its human nature to stand in the dark and curse.
I found the "Java Quake" comment particualrly amusing siocenw e just SHOWED exactly that at Quakecon last week
Actually you can. True, only one iterator per connection(you are using ADO, I'm guessing), but you can create multiple connections to the same database and get multiple iterators(MoveNext, etc).
There's no reason to do your VB programming in Access BTW, unless your intention is to distribute your app along with an Access database. Use VB proper to connect to an Access database and you'll find less limitations.
The next generation of MS programming tools looks pretty good. VB will be strongly typed(no more voodoo variables), and fully object oriented, supporting polymorphism and inheritance. I imagine a lot of games will be programmed in VB since it will have hooks into DirectX.
Also, outside of VB C# looks killer and should serve to do away with MFC, at least for new applications.
No, Thursday's out. How about never - is never good for you?
It s a very sophistcated scene graph system which cooks down to display lists for speed... and all that logic is in (very fast) Java.
Which is why it took 3 guys 1 month to write JAMID.
Try doing that in C ontop of OGL.
There are quite a few firms creating products based on those standards.
As I see it, the sole reason Java seems to be overtaking C/C++ is that it doesn't actually have proper garbage collection. If it did, then 90% of programs would self-delete upon execution.
I never said you can write it in Pure Java... Java yes, C yes, if you compare, more or less, oranges for oranges then Java is quite comparable to C/C++ which is the real point of this item isn't it?
i.e. C + suitable libraries -> DVD player
Java + similar libraries -> DVD player
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"Also, Sun is planning to officially add generics to Java for the upcoming JDK1.5 release.
However, I would contend that most cases where templates are used in real world programming, they shouldn't. Readability and maintainability can go out the window without judicious care programming templates. Templates are ideal for containers, where they assist readability and maintainability. But in many (most?) cases, they result in code that is difficult to maintain.
This is, in my opinion, the reason Java will overtake C/C++ in popularity/use. Java code, with all its simplifications over C++, is easier to maintain and write. The results in fewer projects that end in failure. It also results in code bases that last longer, due to easier maintenance.
--Be human.
I find it's very common for people writing Javascript (or maybe just cutting and pasting) to refer to it as Java. To this day there's incredible confusion over the names.
But then out of nowhere in 2004 comes D! D shall over-throw them all!
what the hell is a 'junk character', anyway?
As for FPS, the next JSDK release (1.4.0) contains an exclusive mode that allows you to disable the windowing system. See the fullscreen exclusive mode API tutorial. There's already a bunch of OpenGL wrapper API's also, with the upcoming OpenGL 1.3, the JVM just may be the application that ships with games rather than DirectX. This is a very good thing as this means games being just as portable as Java, ie. the very same game runs equally on Solaris, Linux, HP and Wintendo. So gamers install JVM's - who cares about Microshaft shafting Java in XP? However idealistic, it's food for thought.
Unable to read configuration file '/bigassraid/htdig//conf/14229.conf'
Geocrawler error message.
Sure most JVMs suck; cope, that'll get better. Also, has anyone heard of any java compilers that write real assembly for your processor, and not just java bytecode? That'd be a step in the right direction for a lot of things..
-bugg
BZZZZT
Wrong answer.
Java has had hardware support for Java2D (and thus Swing) since JDK1.3 JDK1.4 brought in VolatileImage which allows full access to the card-resident memory and on-card graphcis ops.
Well coded GUIs havent been slow in Java for a long time. But ofcourse this is typical of the time-lag in your average Slashdot knoweldge of whats goign on in Java.
Oh, how were the Java DVD player people planning to get all that data to the screen? You'll need more native methods to make sure that data can be sent efficiently to the output device. Did I mention that there is no way to write a DVD player in Java without native methods?
As for the altivec extensions, they are syntactical extensions to the C language. So you can simply say vector aVector, bVector; vecmul(aVector, bVector). It's not really like programming in assembly.
(p.s. Yes, I know I could RTFA to clear this up, but it's an editorial complaint)
You have to be in an OO mindset to write good C++; but when it comes to compromises for the sacred reason of 'performance', at least with C++ you can fall back closer to the metal. Java doesn't give you the option; it has a laudable aim of being write once, compile anywhere, and pure-OO, but it's simply not true, with the differences between VMs.
C++ doesn't pretend to do that; it defines a language and the STL that are platform independent, and then you hook it in with platform-dependent libraries for whatever system you're compiling it with. If written well, you can abstract everything enough and have conditional compilation for every platform, which gives you the compromise between speed and platform-independence.
Java, and dare I say, C#, are going for the 'maximum abstraction, minimum platform dependence' approach by effectively _being_ a platform. When it comes down to it, C and its sucessor C++ have had several years of development by some of the greatest authorities in software engineering, which is pretty hard (not impossible, but hard) to beat.
And your explanation of the divorce statistics are overly concise (to the point of error). I won't dispute your idiot theory (having no data handy), but even granting that, then it's the percentage of successful marriers that is actually much higher.
I do like how paint Java with the brush of religious zealotry with your use of the word 'saved'. Quite effective.
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?
ZFS: because love is never having to say fsck
CPU's and memory are cheap, good programmers are expensive. Your assumption that speed is essential is correct but it applies to time to market more than to performance. Execution speed is not so relevant since hardware is relatively cheap compared to programmers (even lousy ones). The year salary of one programmer will likely solve any performance problems you have when converted to extra hardware.
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.
Jilles
Let's see. I have an embedded linux device.
I can write it's app in C and have it take up 100Kbytes or I can write it in java and have it take up 2.3meg.. Yeah, I'll go the java route, oh and I need to upgrade my processor to deal with the huge overhead of the JRE.
Java is not going to overtake anything except in the cross-compatable on powerhouse platforms. It's too bloated and too slow for anything but.
Do not look at laser with remaining good eye.
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.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"How many different types of cell phones/pda's can you think of? Many, right?
Wanna write an app for them? which one are you going to pick?
Portability. Write it in Java and all the units with Java suport can run it despite drastically (or not so drastically) different hardware.
$sig=$1 if($brain =~
Surprising as this may sound, there's more to the world than kernels and first-person-shooters.
what the hell is a 'junk character', anyway?
Part of the difference between Pascal and Java is Java is the embodiment of a completely Object Oriented language, where Pascal was another in the long line of function-based languages. Pascal's role n the academic world was more as a training language for other languages like C, Modula, or Ada. Java, on the other hand, is a paradigm shift. That's why Java is gaining ground outside the academic world where Pascal merely floundered.
With hundreds of thousands of copies of an OS that won't do Java, that will have a very deep impact on developers. It doesn't do much good to make software that nobody can run.
Yeah, but how popular was Java on the client side, anyway? I don't see many client-side Java apps. Java seems to have found its niche, and it's server-side development (server apps and server components).
As for client-side Java web apps... they're usually stupid and frilly anyway. I've seen soem "wow, that's neat" ones but never anything useful...
OtakuBooty.com: Smart, funny, sexy nerds.
Sure, and then your DVD player is written in assembly, not pure Java. Remember, pure Java means, in part, that it includes no native methods. Reference
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?
A feeling of having made the same mistake before: Deja Foobar
Oh, I forgot to mention something. Its going to suck a lot for the Java DVD player when the GC comes along and and makes everything stop for 50ms. You'd have to write the program such that it generates no garbage at all, so as to not tickle that particular Java feature. Personally, I don't use Java where timing is any kind of problem.
I use both Java and VB (and other things) and find it odd to hear that you can't find the information you need for VB, because I've always thought that MS's online docs were well-organized and complete. Usually when people complain about them they haven't explored what's available. It's usually possible to get a very specific answer to a given problem, often with sample code.
Try msdn.microsoft.com. Don't mess with their site navigation, just do a full text search.
As for books, quantity is not as important as quality. How many books on VB do you need to read?
VB does make it easy to write horrificly bad code. But in the hands of someone who knows the tool, it also makes it easy to write elegant software. For that matter, I've seen some awful Java code, too.
There was news that Windows XP will not ship with any native support for Java. Certainly, a user could add Java support him/herself, but how many users are going to take initiative to do so?
With hundreds of thousands of copies of an OS that won't do Java, that will have a very deep impact on developers. It doesn't do much good to make software that nobody can run.
Granted, many a Java developer's projects are meant for *nix environments, which is just one more pro for the side of good. But I wonder how XPs lack of Java support will affect the number of Java developers.
-WetDog
1. your routine is ugly as fuck, given two objects, it would take less code to inline the function than call it.
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.
http://rareformnewmedia.com/
>Only a true Java developer could write something as foolish as this.
;-)
Really? Actually I'm a C++/C expert.
>Why do you think the behavior of enemies in games are so predictable?
Been listening to you too much?
Or, more likely since noone listens to you; the developers had to spend ages trying to get rid of the random crashes caused by wild pointers and array overflows; and they had no design time left to improve the AI.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"OK I've read a dozen or so posts dissing Java because it's "Stupid" or "Slow" or "None of the apps I run are written in Java" or whatever -- which forces me to say this: Programmers who write in Java are writing code for distributed enterprise applications. They're professional computer programmers, not ether breathing geeks such as ourselves. I say it's waaaay past time that we all collectively pull our heads out of our asses and realize that the world doesn't revolve around Linux/Perl/GCC and Kernel patches!! There's a whole world of programmers out there (who DON'T generally post to this forum because they're too busy getting work done) who don't live and breath everything Linux day in and day out. They work for a living.
End of Rant.
Unfortuantely I see Java being used more and more as a teaching language in universities, ergo more and more developers graduating out of schools are learning Java. Very few college programs will teach anything like C or C++ when they can teach object oriented programming using Java. These developers then move into the private sector and recommend developing using Java to their superiors. It's a vicious cycle. this is also the natural progression for those who are "saved" by Object Oriented methodologies.
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.
All about me
Oh, very true. For example, if I were to do a poll here at MY office, I could tell you that 100% of the developers here use Java! 100%! Wow, there are no more programming languages being used anymore! They are also 100% male, which means that the end of the human race is getting close... :)
"Your superior intellect is no match for our puny weapons!"
Java, by design, has GC- can't get away from it. (Nor, do you want to- that's what makes some of it's selling points possible in the first place!)
Garbage collection would slow/stop a system while it was being performed- it doesn't matter how much horsepower you throw at a problem it still will render it non-deterministic. For some things, that could be tolerated- for a vast majority of things out there it'd be obnoxious to downright deadly to be non-deterministic.
You don't want predictable or unpredictable slowdowns in these sorts of systems:
Fly-by-wire avionics.
Industrial process control.
NC milling.
Automotive ignition control.
Military Command and Control (incl. Signal warfare systems- SigInt, ECM, ECCM, etc.)
Any consumer appliance (How about a microwave that takes a couple of seconds longer to cook something- some of the time...).
Automotive control computers (try a system that doesn't shift the transmission at the right times because it's delayed a second for GC...).
No, not all of this is coded in C/C++. Some of it is in assembly, yes. Some of it's in Jovial, ADA, Eifel, etc.
Pick the tool that makes sense for the job. I don't think a language designed for set-top boxes (That's what Java was...) is suited for much of anything other than things like Word Processors, etc.
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
One advantage of C++, in my experience, is its support for multiple paradigms. C++ isn't an object-oriented programming language, or a functional programming language, or a procedural language -- but it allows me to use all of those paradigms as needed to accomplish a task.
Software is like religion in that one solution doesn't fit everyone. Frankly, I'm happier with a well-written piece of Visual Basic than I am with a sloppy piece of C++.
As for functional programming: I think it is another excellent tool, but much overrated by its adherents. Note that I also have the same opinion of object-oriented programming and other paradigms. Each paradigm brings ideas to the table, providing new insights and techniques. None is perfect, and several can be quite useful.
All about me
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.
Bowie J. Poag
Everyone knows that java's been underlying program development in all languages. After all, computer scientists are machines for turning caffeine into algorithms, right?
It's evidently taking developers from the C/C++, but also the Visual Basic camps, with strong growth overseas.
It's about time!
Die Basic! Die!
You are receiving this message because your browser supports Slashdot Sigs and you have Slashdot Sigs enabled.
You are correct. Fortunately, the vast majority of software development isn't about ultra-high performance applications or systems programming. It's about making applications that solve a problem, and the problems are almost never about speed or being low-level.
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.
Its a metaphor. Order is truth, truth, beauty.
A deep unwavering belief is a sure sign you're missing something...
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.
what the hell is a 'junk character', anyway?
Wow. So that's what french crack does ;) Anyway, I take offense to your statement that scientists don't appreciate beauty. Science is all about finding the underlying beauty in the world. As it has been said many times, Truth is Beauty. As for C++ programmers, I find a piece of code that uses hardware 99.9% efficiently to be beautiful. Meanwhile, Java's focus on rapid coding at the cost of efficiency seems merely utilitarian.
A deep unwavering belief is a sure sign you're missing something...
I like it because I don't have to worry about several different OS's and garbage collection. It's easy to code in and I can get a string output of *any* data type, which makes it easy to debug.
It's that easy.
The number of developers means nothing -- there are more Macromedia Flash developers or Visual Basic developers than developers that any advanced language and Java combined, yet most of useful software is still written in C, C++ and sometimes perl.
Contrary to the popular belief, there indeed is no God.
Even when it doesn't actually show any true statistics, like how many people were surveyed, or any other minor factors like, did 60% of the people surveyed work at the same company!
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.
>You can write the GUI to control a DVD player in Java, but you can't write the
>DVD player itself in Java. You can't write it in C either.
What's the point of your DVD example if Java is close enough in performance and has access to all the same speedups as C(++)?
I mean, sure you'll have to use non pure Java, but then you can't use pure ANSI-C either.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"In Java, a well controlled exception.
In C, a core dump.
Since you asked.
(Okay, I KNOW this is flame bait but how could one resist?)
Exactly. And pigs will fly don't you forget that one.
Your pizza just the way you ought to have it.
For those who think Java today is only suited for slow buisness apss I'd encoruasge you to sdo soem of the following:
:)
(1) Talk to a bunch of folks who went to Quakecon and plyed the JAMID demo. (You need mroe thena samplr of one obviously as everyone's opinions will vary to some degree.)
(2) Got to Siggraph in LA NOW and see the Pure Java F1 racer simualtro that is the talk of the show.
(3) Got to javagaming.org's "Big list o links" and check out some of the stuff there. Of particular interest are "Blastian", "Arkanae" and Cosm.
Those who want to keep their illusions, just skip all of this
Catseye
"Ignorance is bliss and boy do we have one happy government!"
Write one yourself with JCC. You could probably do it in a weekend.
BTW your standard Java compiler, javac, is written in Java.
The benefits of multi-vendor Java over single-vendor VB are too numerous to list here, starting with the fact that Java is a decently designed language (although certainly not perfect).
Hint: the lack of homogenous arrays are no big deal in Java; you get an exception during testing (you DO test your code?) and its pretty obvious what's going on. In C++ homogenous arrays can cause somewhat difficult to debug crashes unless you use templates to prevent them. Thus, this 'hole' in Java isn't a problem in practice; but it was in C++; and was fixed in the normal way- crufting on new features to the language and bloating the specification.
In my experience the C++ typing scheme is still very bad, worse than Java. Automatic type coercion? Just say no. Garbage Collection (not reference counting) is incredibly useful. C++ what a nightmare, gothic language with a truly epic specification. Someone needs to explain the concept of 'elegance' to Bjarne...
Oh, yeah, you claim that the auto_ptr stuff is going to fix all known ills. I'm sure it will make the language more predictable- a GOOD thing. However library add ons typically run more slowly than compiler visible features. Therefore C++ may well end up slower than Java, ironic in a language that was designed for speed at the expense of elegance.
As for Cecil- there is some evidence now that runtime typed languages (e.g. scripting languages) are quicker to write in, including debugging. Still, for somewhat rare applications I think that typing is important.
-WolfWithoutAClause
"Gravity is only a theory, not a fact!"What I'm saying is allowed is being more specific about what types of class can be used for a type parameter. In C++, all you can do is write template <class T>. Here T can be any type, and you have to jump through hoops somewhat if you want to say "only things supporting MyInterface are allowed". The proposed Java generics seem to have this built in.
But this is the problem. It's not just a convenience mechanism in the context of generics, it's essential. Suppose I want to write a generic summing algorithm, iterating over an array of values and producing values[0] + values[1] + ... + values[n]. I'd like to write something like the following.
Unfortunately, while that works with arrays of int or float, it's no good with arrays of, say, BigInteger. Effectively, because user-defined types can't use the normal notation for addition, I need to have two versions of my "generic" algorithm, one for fundamental types and one for UDTs.
Even then, I run into problems if not all UDTs use the same semantics for their add (or whatever they choose to call it) method. For example, since a BigInteger is immutable, I'd have to write a custom version of my "generic" algorithm to deal with this restriction, since the existing one breaks down in the way it stores and updates total. None of this would happen if UDTs could follow what is, effectively, the normal interface for addition.
Incidentally, this code also provides an example of point 4 (inability to differentiate between value and reference types). As far as I'm aware, the line
isn't valid Java. So, again, my "generic" algorithm breaks down because fundamental types need one style of initialisation, while user-defined reference types need another.
Both of these points come down to the same thing: in Java, you can't write a class that looks like a fundamental type. As long as there has to be a distinction in the syntax used with these types, you can never write completely generic code, which is the obvious goal here.
Aside from the lack of complete generality noted above, without the ability to parameterise on integral values, it's effectively impossible to do compile-time induction via generics. That particular technique is used by high performance math libraries for things like automated loop unrolling, generating matrix code, and so on.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
C++ coding is no more difficult or time consuming then VB, and in many cases it can be easier; both to design and maintain, due to the more expressive grammar. The problem is that Most VB programmers are stupid and don't know how to design software.
The fact that the windows C++ API is terrible dosn't help either...
ReadThe ReflectionEngine, a cyberpunk style n