The Future of Java?
Todd AvErth writes "Judge Motz recently ordered Microsoft to distribute Sun's JVM with every Windows product. Salon decided to pipe up about it with an editorial musing about whether or not it's too late. Most of it isn't all that interesting, but some of the comments from Ximian developer, Miguel de Icaza point to the advantage of being able to compile from multiple languages. Anyone know of any projects to compile JVM bytecode from other languages?" Update: 01/23 16:00 GMT by M : Comments were disallowed when this story was originally posted; fixed now. My mistake (although KDE3's stupid mouseover-activates-form-elements user interface, now finally fixed in the latest versions, has to take some blame too).
Heh... yeah, and the worst part is that he had no friends.
;)
On Slashdot, that is.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
can be found here.
It doesn't mention SmartEiffel, though, which does generate byte codes. There are probably many others as well.
Anyone know of any projects to compile JVM bytecode from other languages?
One or two...
see http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.h
Anyone know of any projects to compile JVM bytecode from other languages?
Ada has a bytecode generator. See here
So does that mean that my forced ada classes in college were useful?
I like the article, and I think it is easy to see that Java is going to continue to be a force.
:) Sure Swing is a little sluggish, but when everyone is running a p4 2GHz, it really doesn't matter....
On the server side it has always been a great solution (great for building complex applications, no performance degradation with 'backend' code, and very stable and safe).
On the client side, the MS/Sun ruling will be a huge boon to the applications side - of course developers will start building client side apps! "If the JVM is there, they will come"
smd4985
Lets see.....
.NET VM IL code that gets compiled and executed executed on the fly
.NET allows "other" languages, is pure BS. Does .NET allow IL like C++? NOPE! But so long as the language behaves like C# everything possible. Well gee DUH! The same goes in the Java world.
Java c syntax
C# c syntax
Java VM byte code that gets compiled and executed on the fly
Java single inheritance model
C# single inheritance model
Java interfaces
C# interfaces
Ahh.... If it walks like a duck, quakes like a duck and tastes like a duck, then it is a DUCK!
These arguments that
I like C# and I like Java, but lets leave it that they are the same darn thing! Except one was created to compete against the other!
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
- Scripting Languages for Java
- Interactive Languages
- Non-interactive Languages
The google search JVM languages turned up a ton of stuff. Jython seems to be the most popular scripting lang for the JVM. -PeaceFree as in "the Truth shall set you..."
Apple's Cocoa framework, based on Objective-C, has all been exposed to Java.
Both languages share so much of the same concepts that both languages can call in each other, allowing a project to be composed of both Obj-C and java.
Given Apple's recent extensions to Obj-C, the so-called Objective-C++, you can actually mix C, C++ and Obj-C source code in the same file and interchangeably make cals to and from C++ classes and obj-C classes. Then, calling Java is nearly as trivial.
These changes are finding their way back into the GCC compiler, which is the standard compiler for the Project builder environment.
Why is it illegal to bundle IE with Windows but they are required to bundle Java with it?
Its like telling Ford to ship Mercedes parts with their cars.
Sun is just to stupid to run a business - Java isnt a Standard like C# is.
I think it is important to make this distinction. Don't fall victim to Salon's BS. Granted they have a talented team, and they are good writers. But so help me I am sick an tired of their political twist on everything, and their constantly playing devils advocate on every topic. The more leftist they get.. the more they alienate many of their readers.
.NET :)
Heh.. ok now that my rant is over...
What if Sun goes under? This could be a good thing. What if the java platform became GPL ? I think this is an important distinction to make.
Perhaps the only thing holding back the Java platform is sun holding onto it.
I have nothing to say about
--noodles
Anyone know of any projects to compile JVM bytecode from other languages?
...
Jython
# Dynamic compilation to Java bytecodes - leads to highest possible performance without sacrificing interactivity.
# Ability to extend existing Java classes in Jython - allows effective use of abstract classes.
# Optional static compilation - allows creation of applets, servlets, beans,
# Bean Properties - make use of Java packages much easier.
# Python Language - combines remarkable power with very clear syntax. It also supports a full object-oriented programming model which makes it a natural fit for Java's OO design.
Java work well for many things but I don't fall for marketing material when it comes to putting the food on my table, I use the best scientific information I have.
All the best,
--Achmed
Swaribabu Consulting Inc. -- We code so you don't have to
I Think Sun are really a huge problem
I Think Garbage Collections are too much on my mind
I Think dumps have got a lot to do with why the world sucks
But what can you do?
Like a red rain, beating down on me
Like a Linus line, which won't let go of my brain
Like C#'s ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
I Think slows are gonna drive us all crazy
And write once, run anywheres make me feel like a child
I Think crapyness will eventually be the downfall of civilization
But what can you do? I said what can you do?
Like a red rain, beating down on me
Like a Linus line, which won't let go of my brain
Like C#'s ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
Like a red rain, beating down on me
Like C#'s smile, cruel and cold
Like Linus's ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
I think that processors were too slow for widespread adoption of some killer apps. MS killing it for a few years was a great thing for Java. Now, I can program my multi-platform apps to my heart's content and not have to worry about run-time load speeds (well... for dial-up...).
Life is the leading cause of death in America.
Sure Swing is a little sluggish, but when everyone is running a p4 2GHz, it really doesn't matter....
At the rate of PC sales, I think it's gong to be quite some time before that happens.
when you think about it, MS is really trying to kill java... and in more ways than just the JVM stuff. If you ever visit the MSDN, you might see many items for converting your java code to C#, reasons to use C#.
Take away the business side, what are the advantages of using java versus C#? Looking at Mono it seems to marry both technologies -- correct me if I'm wrong, but they want to compile both.
--------
Free your mind.
Maybe they were giving us time to read the links? That would be a shocker for most /.'ers though, reading the story before posting!.
Not worth the effort for a whole new story, but MS is appealling the judge's decision in the MS vs Sun case, reported by Cnet. MS claims that the injuction (Remember, the case has yet to be settled; the judge, though, deemed that Sun may be victorious in the case, and thus ordered the inclusion of Java as part of the injunction for Sun) would "inflict serious harm" in the various Windows products it would need to include Java in.
"Pinky, you've left the lens cap of your mind on again." - P&TB
"I can see my house from here!" - ST:
Anyone making a Mumps conversion system could do good business.
You do not, however, see a lot of demand for this. The reason is simple. Organizations do not want the complexity of managing dozens of programming languages. Ideally, they would like to hire only Java or only C# developers and have those developers be able to manage all of their code.
In the real world, of course, companies have an existing investment in multiple languages. They have old COBOL, VB, C++, C, etc. systems to maintain. This fact is used by the C# crowd as an argument for the need for a multi-language VM (which Java is in spite of their arguments to the contrary). In reality, however, it would be foolish to take a working, monolithic COBOL system and stick it in a .NET runtime environment. That's a lot of work for little benefit.
It is a much better design practice to build a facade around that system and enable interaction through that facade. When people do this, they do not end up "throwing out their investment" as Miguel suggests. They instead empower themselves to retain the investment as long as it makes sense and replace it it makes sense.
In other words, I am saying that, all else being equal, even for .NET people support for multiple languages will prove to be a non-feature. If it were, people would be using that feature of the Java platform. I know that .NET advocates make the claim that .NET bytecode better supports multiple languages. It is true that it is marginally better. Nevertheless, it still carries a bias towards C#. In other words, languages a lot like C# will be supported easily and languages much unlike C# will be harder.
It's never been too late for Java, any more than its too late for other less popular but powerful languages. Just because Perl is around doesn't make TK, or AppleScript, or Python any less useful, for instance.
I've found that Java is great for complex applications that need cross-platform ability when programmers can't spend too much time in making that compatibility happen. Mac OS X is among the strongest Java clients around, and it shows every time I download a raw JAR and just use it. YMMV, but Java has a lot of warmth left in its cup, and, if other platforms aside from MS continue to support, we'll all get free refills.
(Sorry for the many metaphors. Haven't had my cup of coffee this morning--ack, I did it again...)
Vos teneo officium eram periculosus ut vos recipero is.
I personally think (and that probably isn't worth much since I've written some Java, and no C#) that java is the key to keeping .Net in check. I haven't seen any compelling reasons why .net is supperior to java, even the supposed multi-language feature has been contested. I also see no reason to believe that any non-MS version of .net will be able to keep up, or that MS will bother to let .net flurish on any non-MS OS. Since I don't run a microsoft OS this bothers me. I don't want to see all this developement go towards a platform I will never be able to fully take advantage of.
Java works now. What we need is an open standard for java, with robust open implementations. Right now I think the only stumbling block for java is the lack of non-proprietary software to run and/or develope it. While some of the free implementations are very nice they still aren't able to keep up. Sun should really be pushing to make thier java implementation 'free' enough to become a major component of free systems, otherwise in a few years they'll be protecting and holding on to java while everyone else moved on to microsofts product.
We have an OEM who delivers certain applications to us that are developed in Java. These are ordinary-looking, double-clickable Windows and Mac applications. What can I say? There's nothing TERRIBLY wrong with them, but they're slow to start up, clunky-feeling, sometimes don't refresh the screen properly, have various minor UI inconsistencies with the underlying platform, and so on. They simply do not look or feel like first-class native applications.
...but, still, in practice the actual cross-platform Java applications I've seen are very unimpressive and are not good advertisements for Java as a cross-platform GUI development methodology.
Yes, yes, yes, I know that theoretically these problems could all be solved, and that no doubt it's because they're not using version the latest version X.0165 of Java GUI technology flavor Y... and it's all Microsoft's fault... and so forth...
And I still experience a feeling of dread whenever I go to a web page and see "Applet loading..."
"How to Do Nothing," kids activities, back in print!
Our company is just about to start a big customer project and because the target system is Windows and there certain needs we were thinking to go for C#, but due to recent ruling and our own test we decided to pick Java. That makes me SO happy.
I know there are quite many companies how are just starting to accept Java as THE programming language.
My first two programming classes were in Java. I really think we would have had more fun learning the same concepts in Python. The thing that I've come to love the most about Python is that it doesn't force you to build an entire class just to test a feature. It's a great language to encourage CS students do their own experimenting with.
.NET has over Java. I know there are other languages that __can__ targe the JVM, but Sun doesn't exactly seem to be pushing that. I'll never understand why though. Java could be made into their platform's equivalent of C# and they could develop their own clone of VB for Java. Hmmmm VB-J? It'd be great if they'd build VB and ObjectPascal compilers that target the JVM.
I'm personally ambivalent to Java. I like it for some things, but the only real reason I want to learn it is because so many use it. I just recently discovered wxPython and think it's probably easier for me than Swing or AWT.
The best thing that could come from Java for development as a whole IMO is Javadoc. If that tool were extended to support C++, C#, VB.NET, Python, PERL, etc it would make everyone's lives easier. Seriously, has anyone seen better documentation than Sun's Javadocs from something so big and complex as Java's libraries?
I'm really excited about Mono because I really like VB.NET and C#. I think the ability to use any language you want with the same libraries is a very important strength that
Click here or a puppy gets stomped!
I think Java's future can only get better, not because of the recent ruling against Microsoft - which to be honest I don't think is all that important. Rather, the fact that all the universities (at least over here in the UK) seem to be adopting Java as their main language for Computer Science and related courses. It won't be long before a whole generation of enthusiastic Java coders emerges.
Another issue is that as linux becomes more widely used, code that can easily be run on multiple os's becomes far more valuable. And developers may turn to Java for this reason, especially with all the cheap, fast, hardware we're all running nowadays where speed and efficiency arn't as important as they used to be in many situations.
Tcll
Lisp
Scheme
Basic
Prolog
Smalltalk
cobo
ada
c
For Starters
see here
On top of which you have gjc which allows native compilation on linux (they have eclipse running on it now).
Personally i think mono is a needless duplication of effort whose only real benificiary is microsoft. If the mono effort was aimed at the existing open source jvm's it would be a real kick in the teeth for microsoft.
"In Xanadu did Kubla Khan a stately pleasure dome decree"
Before someone starts talking about .net, it should be noted it is not suited for interpreted languages (see the attempt to port python to it), and several "compiled" languages can't adapt to it. Java, OTOH, makes things clear for languages trying to compile to it.
They failed to mention the biggest advantage to using Java - a company can develop a front to back end solution completely using Java. Admittedly, this should be achievable using C# now, but I think this is what companies are interested in rather than any cross platform abilities of the code.
Also, it always irritates me when they ask only the most biased people imaginable whether such-and-such a technology is going to survive. It's like asking the Pope and the Ayatollah which is the best religion...and leaves us no clearer as to what is really going to happen...
Just because it didn't ship with windows doesn't mean it didnt exist, or wasnt easily installable if one wanted or needed it.
I mean shockwave and adobe acrobat reader dont ship with windows but they wind up on virtually everyones machine. (I know this is apples and oranges, but for the sake of my argument it's good enough that it's all fruit).
If there were Java applications that I wanted, I'd install the JVM. Heck, bundle the JVM with the app's installer or in the case of an applet, stick a little 'click here to install java' link in.
So whats the difference? Has the java community been sitting on their hands doing nothing, waiting until the JVM ships with windows? Is there a shipload of software waiting in the wings just waiting for the updated XP disks to ship?
Or does Suns implementation just stink on ice and we needed to mandate that MSFT come in and 'get it right'? (This is a deliberately absurd rhetorical question, not flamebate)
I really see no signifigance to this at all. How java gets onto the machines is irrelevant, it's how much developer mindshare the language recieves that will decide it's level of success.
I don't need no instructions to know how to rock!!!!
And, coincidentally, I went to college with him, so I have to give him a plug
T
---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
...with no mention of the technical merits of .NET versus Java.
Why did anyone even *post* a link to Salon on a technical subject, for heaven's sake? Desperate for a java feelgood session?
Posted anonymously so I can use my karma as a FORCE FOR GOOD!
...is to blame their shortcomings on Microsoft. It HAS to be their fault.
Sun has $5 billion cash in the bank and has very low debt. How exactly is it "going to go under"? their stock is at pre-internet hype levels, but then again, so is everyone else's.
Well, not quite two (1 1/2 maybe :)
NetRexx "compiles" down to java bytecode, but it does it by compiling into java first. NetRexx allows you to use any Java class.
NetRexx was developed by the IBMer who developed the Rexx programming language. It has a fairly easy syntax, provides some very powerful/easy to use string parsing facilities.
You can pick up a copy of NetRexx (available for download from http://www2.hursley.ibm.com/netrexx/)
The other language is Jcon which does compile directly to the javabyte code. Jcon is a "Java" implementation of the Icon Programming Language.
To quote the website: Icon is a high-level, general-purpose programming language with a large repertoire of features for processing data structures and character strings. Icon is an imperative, procedural language with a syntax reminiscent of C and Pascal, but with semantics at a much higher level.
If you poke around deep enough in the history of Perl, you will find references back to Icon.
Details of Jcon (and download) can be found at the Icon home page at http://www.cs.arizona.edu/icon then follow the link to Java-based "Jcon".
It has facilities in its IL compiler to spit out jvm bytecode.
Quote from this link: Oct 02-10-2002: Java Bytecode Output for Portable.Net
Sylvain Pasche has fixed up the Portable.Net assembler to generate the correct java bytecode. Now the C# compiler sports a nice JVM output backend. The results become really interesting when the whole pnetlib can be compiled into JVM code. Read full details here.
And, from what I know of these guys, they will go to all lengths not just to get the M$ stuff working correctly, but *all* supported languages. They're really a smart bunch.
However, the problem with Java is:
Bad business execution. Garbage output performance. Attempting to be too many things to everyone and only managing to do one thing well.
For server-side execution where objects are pooled & recalled for further use in memory, it's great. But no-one, and I mean *NO-ONE*, will ever again attempt to use Java as a serious tool for a serious GUI application.
Java wasn't doomed by having a bad language model. It was doomed by everything else.
i'm amazed that i survived - an airbag saved my life.
I agree completely with your comments on the future of Java as a server side solution. JSP, servlets, and J2EE are all fantastic.
Sure Swing is a little sluggish, but when everyone is running a p4 2GHz, it really doesn't matter....
But it does matter, if other programming languages still run relatively faster than Java. I agree that it's not as clunky as it was a few years ago though... *shudder*
Two things I feel you've left out are:
1 - The embedded systems market. When I was at Uni this was being touted as the next best thing. I don't have any real statistics for you, but I'm sure Java is doing well in this field.
2 - The mobile phone market. Pretty similar to my first point, the KVM (Kilobyte VM - a cut-down version of JVM) and related APIs in J2ME are a big player in the mobile phone business. The company I work for is developing mobile phone games, and Java has got the support of the handset manufacturers, which will give it superiority over other technologies that havn't had as good an uptake.
---
"An eye for an eye leaves the whole world blind" - Gandhi
What Sun has given us instead is a huge server-side environment. Sun dropped out of standardization efforts twice (you may argue whether their reasons were good, but the fact is they broke their promises). The GUI toolkit and graphics systems (Swing and Java2D) are proprietary to Sun and have no third party or open source equivalents. Sun has implemented almost none of the recommendations of the JavaGrande forum. And Sun's implementation of genericity is not type-safe. And on top of all that, Sun holds patents on some core Java technologies (like the byte-code type checking).
The biggest promise of Java, easy cross-platform GUI development, has been the biggest disappointment as far as I'm concerned. Swing is a pretty neat GUI toolkit on Windows, but on Mac and Linux, it's flaky and unpredictable in my experience. And Sun's lowest-common denominator cross-platform philosophy is seriously flawed in my opinion, putting everybody into a straightjacket. wxWindows's cross-platform approach is much better: wxWindows gives you the lowest common denominator, and then it gives you convenient access to platform-specific features when you want it--that's essential for writing high-quality apps.
As far as I'm concerned, Java has stagnated and become bloated over the last few years. And I don't think Java is a good platform for open source development (since important parts of the platform are not available in open source form).
I think Mono is the best option for open source systems. Microsoft has learned from Sun's mistakes and done a (slightly) better job with language design. And Microsoft isn't afraid to fix the runtime to make things like genericity work right.
And, sad as it is, I think the legal and patent situation is better for C#/CLR than for Java/JVM: yes, like Sun, Microsoft has patents, and unlike Sun, they are even threatening to assert them, but unlike Sun's, those patents seem peripheral and easily worked around.
What's probably going to happen is that IBM takes away the rudder from Sun and pushes a Java platform built entirely around open, non-Sun standards. And projects like Mono will probably offer full Java support pretty soon. So, in some sense, Java is going to survive, but Sun and the Java2 platform will disappear. And, as far as I'm concerned, it won't be missed either.
Yup, it is sad that to use the Java platform you have to code everything in Java. Yes, it is great that to code for .NET platform implementations, you will be able to work on any language.
.NET, and that you can write your own implementation, BUT, all M$ .NET developers are using .NET to use M$-only technologies, like COM and OLE. And, for example, I'm going to use MONO to write GNOME apps, and I'm sure I'll use CLR apis on MONO that will depend on libraries that are only available on Linux/GNOME (until someone ports them to windows).
.NET, no one is going to write platform independent apps on .NET/MONO.
But only in Java you'll get true "code once, run everywhere"... yes, I know that M$ standarized the core of
My point is that, altough you can write platform independent apps on
So Java still has one important advantage. And I think that "code once, run everywhere" is usefull in many situations.
Yep. As the judge pointed out, it IS their fault.
Personally, I like how the same link answering the stupid question at the end was posted 9 times within 10 minutes.
With apologies to Miguel "Everything else that was easy didn't get standardized, but the important parts did." de Icaza, Microsoft has already demonstrated that they will add and extend API's in the .NET platform that are not part of the public specification. As with Wine the Mono project will _always_ be playing catch up to MSFT. This gives MSFT first mover advantage and should invalidate the claim of .NET's cross platform capabilities.
In contrast the Java Community Process (jcp.org) publicly discloses the API specifications for Java Standard Edition, Java 2 Enterprise Edition and Java Micro Edition. Anyone can join the JCP. Any vendor who ships a product branded with any of these names has access to these open specifications. Any developer who programs to these specifications can deploy to any of these vendors. Thus Java is not only multiplatform it is also multi-vendor and open in a way that the .NET platform will never be.
The Java virtual machine is very much designed around the Java programming language. I have heard about other languages being able to compile to it (isn't there an Ada -> JVM compiler?), but basically the language has to be lucky and use the same general feature set. Compiling C++ to the JVM would not be reasonably possible, since the JVM does not support raw pointers (for a good reason: if pointers were allowed, it would be impossible to verify that a Java applet was safe to run locally).
.NET) defines a virtual machine which can run many languages, while posessing the verifiably secure properties of Java bytecode specifically for those languages which make such verifiability possible (basically, languages without raw pointers). If you want a VM that supports multiple languages, the CLR is really the best option right now.
:)
Microsoft's CLR (common language runtime; part of
Personally, I am not convinced that such a common runtime is always an advantage. The CLR basically defines its own machine language, with all the basic instructions you'd see in any other assembly language. I don't like that approach because it is too low-level, and makes optimization harder. Allow me to explain...
It is a rather common misconception that bytecode-compiled languages must necessarily be slower than native compiled languages. The opposite is actually true in many cases. If you are running your bytecode on some sort of interpreter, then yes, it will be slower, but typically bytecode is re-compiled to native code at runtime. When this happens, the compiler can perform all sorts of optimizations specific to the host machine, OS, and the exact library set in use, which would be impossible if the software were distributed as native code. Thus, the code actually ends up faster... in Java's case, it can approach the speed of C, which is surprising considering all the abstraction in the Java language -- based on the languages alone, you would expect Java to be much slower.
Anyway, getting back to the point, higher level bytecode descriptions allow more optimization on the host machine. I am actually desiging a programming language right now, and my bytecode is only a little more than a parse tree. I like it that way.
Just think of the language runtime like a library. Different programs use different libraries. What's wrong with that?
Of course, it's not a true departure from Java... it even recommends that program filenames end in .java . It can compile java code, but not the other way around.
After waiting for 45 minutes to make my comment, that I can't even rememebr what it is now.
Must have been something really meaningful and worthwhile then.
Guess Michael didn't have his cup of Java this morning? Har Har Har.
--------
Free your mind.
What you are talking about is Managed C++ and beyond. That is != C++.... Once a 100% specification of C++ is implemented in .NET then I will believe it....
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
I think people make a bigger deal of MS shipping Java than they should. Java on the client has been in pretty sad shape for a long time, yet Java's popularity has grown. It's used a lot for server-side applications, and apparently in embedded applications as well (although I'm not as familiar with that side of things). Whether or not MS ships a decent JVM on Windows doesn't change this -- Java will continue to be used just as it is today.
Does it make a difference for Java on the client? Maybe. Although most of my Java work has been on the server side of things, I have written a couple of Java client apps as well. But those were for use inside the intranet, so it wasn't a big deal to require users to install a JVM. It certainly won't solve all of Java's client-side problems. Performance is much less of a problem than it was in the early JVMs, but most Java clients are still slower than their native counterparts. Perhaps more importantly, there are quite a few bugs in the GUI libraries (both Swing and AWT) that make it difficult to write highly polished applications. And with Swing you get problems with the look-and-feel not matching the native platform, which is a problem for some. But I think that part of the reason why these are still problems is because Java on the client hasn't really taken off -- maybe more of these issues will get solved if people start looking at Java as a valid client platform (because MS is shipping it with Windows) and start writing more client apps.
But regardless of whether it makes a difference, I think the ruling does make sense. MS had a contract to provide a compatible JVM, and they didn't hold up their end of the contract. (At least that's my understanding -- I don't know the complete details of the contract.) Therefore they should have to make ammends -- maybe it is too late to "save Java" on the client, but it shouldn't hurt.
Miguel de Icaza point to the advantage of being able to compile from multiple languages.
As a person who've got a feel of writing JVM-targeted compilers, I'd like to notice that it makes extremely poor target for other languages. JVM was designed explicitly for Java, without any other language in mind. Thus, writing translators from other languages takes certain number of convoluted tricks.
If your source language has closures, true lexical scoping, multimethods or multiple inheritance, JVM is clearly a suboptimal vehicle, unless you want to bend over a lot. From performance standpoint, its stack-oriented machine isn't optimal either. JVM architecture also leaves no easy ways to implement proper tail-recursion.
CLR is likely a much better target, but even that one, designed for interoperability from scratch, has some rough edges for non-mainstream programming languages.
Lisp is the Tengwar of programming languages.
I've considered doing this on several occasions, but always bailed when it comes to outputting class files.
It's far easier to use Java as the output of your "compiler" and then let javac do the hard work for you.
It's also a lot easier to debug too.
With a little effort the auto-generated code can be pretty readable and sensibly relate back to the original "code".
You get to the same place in the end though, and probably quicker (from a development time perspective).
I used to use this lovely thing called MetaTool (from AT&T) for this sort of stuff but now there's tools like javacc that I think are free and, of course, written in java.
I think Java is in an excellent position. There's no doubt that Microsoft could kill any technology that relies on Windows, but Java is in a very strong position nonetheless. With Mac, Windows, and Linux all thriving, it only makes Java stronger. The stronger either Linux, Mac, or another OS alternative gets, the stronger Java will get.
.NET, and it comes across as simply a ringing endorsement of Java. Nothing can match Java's openness, flexibility, and power.
.NET is for Microsoft to GPL their implementation. They will have to compete in the areas of openness and competition on the Internet, or the Internet will eventually win. That would be the only possible advantage that would make developers shift away from Java. Miguel, although he may enjoy the limelight, is seriously deluded and is bringing his confusion to others. What he is using and plans to incorporate into his strategy is not .NET. He is using the CLR and C# specs, NOTHING more. Even if those are standardized and "protected" somehow legally (a legal body standing up to Microsoft remains to be seen, which is why this Java ruling is promising), it is a small subset of .NET. He should avoid using that moniker, since it confuses everyone. He is not using .NET. He is not using .NET. He is not using .NET. He is not using .NET. He is not using .NET. Miguel, you there? You are not using .NET. Stop using that word. There, that will hopefully help to counter his blatant attention grabbing.
Otherwise, I could not be happier with it. It's a truly unbelievable technology. I would classify as one of those that did not have an "existing investment" to protect, but I think the reasons for writing an application in Java are enough to warrant it. It was a bold move not to allow direct memory access, and it's a strategy that will pay off. As network use increases, Java is like Noah's Ark in terms of stability, security, and network performance. People thought they were crazy, but now they're starting to understand. Sun said the "network is the computer" so long ago it's not even funny, and Microsoft is trying to act like a visionary with
That said, I think the only real chance for
Two PC orientated are making lots of money: Microsoft and Intel
.net and Microsoft CLR is Intel.
Both have a proprietary platform (Intel instruction set / Windows ) that is almost everywhere
Meanwhile PCs are increasingly low margin commodoties.
I think the real target for
I know that multiple languages can compile to Java Bytecode.
.NET, and I'm wondering if Java can do it too.
Can anyone tell me if one Java-compiling language can use objects written in another one?
To me, this was a major advantage of
My Journal
just to get something as useful as java, onto the 'survivors' list, was a feet of gnu technology. IT shouldn't be LIEk that?
.asp, for a while (to the poiNT of asphixiation in some cases), there's a few things to understand.
.asp.
so, acknowledging that J.'s had his head held up his
at some point, no doubt, many more will realize that there's more on the LIEn here, than a few billyuns in stock markup fraud, & that yOUR represeNTation upon capitoll hill, is akin to that of same, in the frauduleNT stock markup/?pr?/softwar bullshipping industrIEs.
as my grandma might say: they all go pottIE, through the same quill.
the good gnus is: ALL of that payper liesense crap, is just poo. &, there's more & more evidence all the time, that there IS a God, & it's likely wanting US to have benevolent tools to keep track of ourselves, while PREVEntING unwaNTed intrusion? zock De blur?
even better, you don't have to 'join' anything, or take any saykrud oath, promising to lie about somebody else's lies.
members only my
C#: Delegates, events, properties, advanced introspection, seamless integration with modern W3C standards (XML/XSD/XPath/SOAP)!
Java: Annoying workarounds to do achieve the same thing!
And don't even get me started on reflection emit!
The java language has become stagnated and should embrace new concepts that simplify design if it wants to remain relevant. It was the best thing around 8 years ago, now it must evolve with the times, or get left behind as a legacy platform.
If C#/.NET/ECMA CLR delivers new more effective approaches to design, then it will become the language/platform/religion of choice.
ralvek
NetREXX came available while Java was still in it's 1.1 iterations... Developed by Mike Colinshaw (spelling probably very wrong) at IBM.
-- The universe began. Life started on a billion worlds...
-- Except on one where stupidity was there first.
Responses that are sure to follow:
Check out the moderation totals on this post (5143337). At time of writing they are:
"Moderations: 70% Offtopic, 40% Funny"
WTF?
Oh, fucking offtopic here I come again.
graspee
The JVM supports loads of languages and so does the CLR. But who cares? People will develop, almost exclusively, in C# and VB on the CLR and people will develop, almost exclusively, in Java (and a scripting language, Jython I hope) on the JVM.
All the rest are side shows.
The JVM is cross platform now. The CLR might be, but might not (I'll believe it when its running on PalmOs and Symbian, not just Linux and BSD).
BigTom
The whole C# and .Net thing is a potential competitor in the same arena, but I don't think that Microsoft's inclusion (or not) of Java is going to matter much. I always figured that Java was intended to allow cross-platform desktop app programming, but the niche it seems to be filling is a back-end role. Personally, I had expected Perl to fill this role as the new COBOL, but demand for Perl seems to be way down, except as one of those "we also expect you to know Perl" type things, which never actually turns out to be important in the job.
proof, n. A demonstration that a conclusion is implied by certain premises and axioms.
The page you list shows a hundred or so that run on the JVM. A similar page for .NET shows only 27.
Not what the marketing folks at Microsoft would have you believe, huh?
---- There is a fine line between sayings that make sense.
Who cares about JVM if Python, Perl and Tcl from Active State can run faster and more reliable being interpreted by a native code based interpreter?
Besides Python, Perl and Tcl, there are many good natively (means: safe and fast) working interpreters on Windows: Prolog, Lisp, Haskell, Erlang, Mozart, Mercury, Ruby, and dozens of others.
Why would I need a double interpretation, when the interpreter can work in native codes?
And why should I limit myself to Java centric development, when right language for the right job is much better approach?
By inlcuding other interpreters into Windows and making a good advertisement of it, Microsoft can prove that JVM is not the only choice developers have for cross-platform development.
No need to mention that many of cross platform interpreters are licensed allowing them for being distributed with Windows. I think many developers of those interpreters would be happy to push their software to PC market, especially when the giant is pushing.
Of course, Microsoft can try to bind interpreters to .NET, but that would not be a problem if it would be an option - use it if like it or ignore it.
P.S. I don't like Microsoft's monopoly, although it's the only example of a bad market behaviour - look what Apple is doing. I don't like Windows/NT/2k/XP architectural design, although it wasn't the worst case until now - MacOS-9 was much worse. But I don't like Java either (especially thoughtless decision of most of companies to use Java only b/c Java is hot term on the market) and I don't like what Sun is doing with Java. I am not sure what I dislike more - Microsoft/Windows or Sun/Java, but I like to have more choices in Windows OS, that's for sure.
Less is more !
too late. check out the thread now, all -1's. God bless michael.. the dude has some serious issues.
There was a whole spec for it, picoJava I think, and I believe they even got to preliminary discussions of products. But language-specific processors have always been losers and this was always a stupid idea.
Parrot is the way to go. It's open source, virtual machine. Supports some languages already, but the VM is still under development and needs some help. Come on, even Java will compile to it in the future. =)
Read the EJB specs, then look at a well designed JSP page (complete with taglibs), then read up on struts (ok, there are struts-like libraries in other languages, but I like to give it props).
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
Here's another language JiL that compiles to Java Byte Codes. It's a language that's better than Java but worse than Common Lisp, so it kind of sits there in the middle.
It allows Java programmers to get around one of Java's biggest weaknesses - the lack of a macros.
http://www.franz.com/support/documentation/6.2/doc /jil.htm
Java would be zippy and responsive had you included it earlier in Windows, but now it's slow and shitty, and it's ALL YOUR FAULT, Bill Gates. For shame! Quit making Sun's products suck!
And quit making MS Office too so that StarOffice can SUCK less too.
Originally, lots of people jumped on the Java boat because they realized it was a Full Employment program for Programmers. Rather than small groups of smart people, it allowed you to "scale" development to huge groups of people writing cookie-cutter code.
Manager building his empire? "Architect" looking for power? Sick of butting heads with you know-it-all coworkers? Pissed at that stupid Oracle DBA who won't let you do what you want?
No problem! Just adopt the Java "development pattern" and you'll have a team of 30 coders and 3 business analysts and 10 QA people in no time flat! Nobody has any idea what the fuck is going on, but the thing will eventually get finished.
Great. Except now, the whole process has been routinized to the point that you can just ship it off-shore for 1/10th the cost and the same craptastic results. No job for you!
But wait, Microsoft still believes in The Myth Of The Ueber-Programmer. Start boning up on that dotNet...
I look at their code and it appears to me like they don't know how to use a relational database, so they spend a bunch of code on reinventing indexing, joining, multi-user contentent management, persistence, searching, sorting, etc. using "patterns"
Well said.
Overall my java experience has been nice. I've done a little bit of everything across the spectrum, server side, desktop and pda. I really enjoy java on the server side. Whether doing a server program or a plugin such as a servlet its nice. The NIO classes in 1.4 make server programming much more robust while open source java tools from apache make web development feel right. Anytime I've done asp and com development (vb) I always feel like I'm doing procedural code in an object oriented environment.
Desktop java has been ok. I don't do much on that end anymore because I have no need. Swing has a nice api but my experience with some of the larger swing apps (Jbuilder and Netbeans) kind of make me shy away from it. Eclipse is a different story. I think that would be worth doing desktop development with.
PDA java is basically a throwback to the 1.1 days. At least on the Zaurus. Its Personal Java which is pretty much 1.1 for pdas. The Zaurus awt implementation leaves a bit to be desired. I hear its the same on the iPaq just different issues. I saw that IBM is looking at releasing a swt version for QT/E. That should be worth looking at.
All in all I have to say that I have enjoyed my java development experience.
In Republican America phones tap you.
There was quite a bit of interest in NetRexx about 5 years ago, as there are quite a few MVS (aka zOS OS/390 etc) developers familiar with Rexx.
At the time Java was very weak when dealing with strings, and the old crusty C syntax was a real turn-off for folks used to PLI and COBOL.
Ive not heard of any real NetRexx activity recently, although the web site shows its still being activly developed.
NetRexx is an IBM thing, so may become more popular as Eclipse and Websphere penetrate the core business divisions of large enterprises. NetRexx is able to use the Java APIs, so there is no problem getting at J2EE and SWT stuff.
**TODO** Steal someone elses sig.
Yes, Java hype is very bad. Whenever I took a java course - in college or from work - it would always have an introduction to a section.
The introduction went something like this:
"This is possible using programming-language-X but has these sort of things that make it annoying for the programmer. Java provides the best solution for Y."
The J-Books (java books) would do much better to just present java's solution to a given problem or technology space, rather than trying to convince me to drop everything and make me a jdeveloper!
--------
Free your mind.
- Microsoft does not distribute anything but Java 1.0, so Windows users must get a large download from Sun.
- Once you get the recent version of Java, the applet tag is still hijacked by the old microsoft version of Java.
- The object tag is recommended as a replacement for the applet tag because you can specify which vm you want to run the applet. Unfortunatly different browsers want different parameters. IE wants some got awful random string of number for the classid, where Netscape wants something in the format "java:myclass.class".
- There are ways to nest platform specific object tags (or object and embed tags) so that it will work in both Netscape (Mozilla) and IE, however, these tricks are hackish and don't seem to carry over to Macintosh versions of IE or other Macintosh browsers.
Although I program primarily in Java, I hadn't written an applet in years. The other day, I decided to try to get my Random Password Generator to work as an applet. It works in Windows IE and Linux Mozilla.If windows starts coming with a recent version of Java, perhaps the applet tag will become useful again.
Other than applets, the death of Java is greatly exaggerated.
Read the EJB specs
i nd ex.jsp
Or this:
http://www.softwarereality.com/programming/ejb/
Are you kidding? How about an extensive, reliable, tested library of networking, user interface, and I/O code which can be used to create "complex applications" extremely easily.
I look at their code and it appears to me like they don't know how to use a relational database, so they spend a bunch of code on reinventing indexing, joining, multi-user contentent management, persistence, searching, sorting, etc
I can't comment on your colleague's coding standards and style, but it appears that they may have been coding cross platform JDBC code, using only simple DB features so that they could switch databases easily. I know it's not unusual to develop initially using something like Apache/Tomcat and MySql, then switch to 3rd party commercial app servers and databases. Anyway, a criticism of their code cannot be taken as a criticism of the language. The fact that you can replace these DB functions in Java code makes it even more flexible.
DotGNU Portable.NET can compile C# code to Java. The libraries are lacking, but more support is in the works.
The issue with the CLR and multiple languages is that .net.
it doesn't really run other languages. It runs "modified"
varients of the languages. As any VBer if VB.net is the
same as VB. Or if they can just pick up their old programs
and run them on
Miguel talks about preserving your code investment but
fails to mention that all that fancy C++ you have will have
to be rewirtten in order to run on the CLR.
I believe jvm isn't a good fit for some languages, but it does appear to work out for higher level stuff like eiffel and (the already mentioned) python (jython).
Sounds like Perl to me.
I guess conservatives are not good at blaming others (countries) for their problems.
What exactly is there in Java that allows one to build "complex applications"?
What is there in Java that DOESN'T allow one to build complex applications? Based on the thousands of commerical web sites now using server-side java, I think it is fair to argue there is more evidence for than against.
I look at their code and it appears to me like they don't know how to use a relational database...[yadda]
Ok, now you are confusing bad developers with the language that they are using? If you are a sucky programmer I doesn't matter if you are programming in xBase or Java, you will still suck. But that doesn't mean the language itself is the problem.
Show me some objective evidence that Java is superior, not brochure cliches.
How about some objective evidence (i.e. not from microsoft) that it is not? Meanwhile, Oracle, IBM and thousands of developers are throwing their weight behind Java.
They yanked some dynamic typing features from VB, for example, because they were not "Javish" enough.
Did you just imply that VB is somehow a better language than Java? Where to start...well, I'll let somebody else weigh in on that gem. Man, now I really can see where your rep as a troll came from.
Troll, poster, troll!
Are you kidding? How about an extensive, reliable, tested library of networking, user interface, and I/O code which can be used to create "complex applications" extremely easily.
Perl, common-LISP, Python, Smalltalk, etc. have extensive libraries also. Java API's are a mess IMO. You don't want to get into a my-lib-is-bigger-than-yours battle with them.
The fact that you can replace these DB functions in Java code makes it even more flexible.
If you can swap out DB operations, then you are probably not using the DB to its full potential, but as a mere filing system. If the only solution to swappability is reinventing a database, then please reinvent a relational database instead of a network database.
Table-ized A.I.
The GNAT (open source) Java bytecode version was in fact released, but then support was subsequently dropped for lack of paying (for support) customers. I have not heard of the Aonix and AdaMagic (both based on AdaMagic) versions being dropped.
As to whether your Ada training would become useful, the full Ada language is not available under the Java Virtual Machine, only the subset of capabilities that are also supported by the JVM itself. So yes, your Ada training would be useful, in understanding the limitations of the JVM environment !
I'm not sure if it is still available, but one of my college friends worked at an ADA compiler company which had a product which compiled ADA to the JVM.
I don't see things in black and white; I see the gray. Heck, I actually see in color, which makes things more difficult
Java has it's place, but if you come across someone with the opinion that Java is the be all and end all, avoid them.
The very best thing about Java is the marketing hype Sun have managed to create. It's only Mac-o-philes who seem to be more obcessed (a Mac-Java geek is something to behold!).
Java's a decent clean OO language, it's got a good set of standard/accessible powerful libraries, it's handling of libraries is good (compared to say C/C++), it's simple to learn the language basics and the GUI toolkit (swing) is reasonable.
However for me Java has not delivered on it's promises. Performance generally is poor, compared to say Perl, and is dire when compared to C.
Java also failed to deliver it's platform independence - you just get so many problems running on different platforms and different VMs. Compare this to say Perl - if you avoid platform specifics, Perl just works. Even compare to C when using a library to abstract platform independence (e.g. things like in Gnome/Gtk or Qt), it's not so hard and at least the mistakes are usually yours. I know it's not the fault of Java as a language, but if it can't be implemented well, it won't be much good.
The final major reason Java has not delivered is because it's not made programming any easier or error prone - and much has been made of this promise. Yes, gc does save some bugs (it does cause some more, but on the whole it's good). Java does not save you from uneducated developers or people who simply suck as a programmer. I've seen some steaming piles of turds writted in Java by people who really should be better. This can be said of any language, but much was made about Java being a language to make people make less mistakes - they just make different ones.
So use Java with your eyes wide open, it's decent, good in some areas, weak in others and eventually you'll move on to the Next Big Thing TM.
Jamie
Every Java developer knows about http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.ht ml. Sadly it is just the java developers who know about it. In the marketing world, the CLR supports any language (even Java, which is the funniest :) and the JVM "does" only Java.
.Net supports only one existing language. C# is a new language, which you have to learn. VB.Net is not VB, the VB guys have a lot to learn, same for Cobol.Net - but all this talk yields to nothing, because the MS marketing guys rock - they know how to talk and how to position a product. Most others do not. And in the end, they have the most influence!
Also, IMHO
What is there in Java that DOESN'T allow one to build complex applications?
I am NOT saying that Java does not outright run, I am just saying that the hype is unjustified. It is just another language among thousands. Nothing special other than the hype.
How about some objective evidence (i.e. not from microsoft) that it is not?
Language benefits are equal, unknown, or subjective until proven otherwise. The burden of evidence is on Java fans, not me.
Meanwhile, Oracle, IBM and thousands of developers are throwing their weight behind Java.
Because of its hype it is the only thing they can see that can kill Microsoft. The "popularity metric" is not very meritous. Otherwise OS/2 and Amiga would still be alive (in some form).
Did you just imply that VB is somehow a better language than Java?
No, I did not. I was only demonstrating how OO hype has resulted in good features being *removed* just to "match" Java.
(Although VB is one of the few mainstream languages that can/could straddle the line between static and dynamic typing. I have to give it credit for that. Plus, it does not have that archaic semi-colon that we can't seem to get rid of.)
Troll, poster, troll!
Sun is a Java Troll; the biggest IT troll since MS. Didn't Scott McNilley (sp?) once say, "I don't see why anybody would use any language besides Java." If that ain't a troll, than nothing is.
Table-ized A.I.
I realize that each language has its strengths and weaknesses, but bear with me for a moment. You get hired at a new job, where you inherit a .NET application. As far as anyone knows, it's C#. When you start looking at it further, you realize that it is actually made up of half a dozen languages, all of which you'll have to know at least remotely before you can understand the whole thing. Is this necessarily a _good_ thing? I don't think so. The argument Microsoft uses is "everyone can use what they know, and are most productive in". That's all well and good until those people leave.
Sure, other languages have great libraries, and they are great languages too. My point was in response to your comment "What exactly is there in Java that allows one to build "complex applications?".
It sounds to me like you have a grudge against Java, or perhaps a strong resistance against new or different things (which isn't always bad). You've heard a lot, but it doesn't sound like you have any real experience.
So what if all the Java people you've encountered have re-invented the wheel? I know a lot of people who do that in every other language I've encountered. It doesn't say anything about the language, but rather that there are a lot of bad programmers out there.
As for the lack of functions: who cares? That doesn't seem to get in the way. Personally I like creating a utility class with static member functions. It essentially behaves the same as putting global functions in a namespace in C++, which is what people should be doing in that language but rarely do as they're not forced to. Doing it this way for example makes it a lot easier to find the functions without having to resort to grep.
For me, one of the strengths of Java is the huge class library that comes with it. Ever tried cross-platform code in C or C++? The STL is a huge bonus in C++, yet there are still huge deficies that require knowledge of numerous third party libraries, e.g. threading, network I/O, GUI, distributed components, etc.
MaVerickDBMS compiles the legacy BASIC code from these systems into Java Byte Code. This code is not the traditional "10 PRINT HELLO" BASIC. Nor is it like VisualBasic. It is a very simple, and powerful data-oriented language.
SpamapS -- Undernet #Linuxhelp
So why is the Ada that can be compiled to JVM (by either translator) a subset of the full Ada language ?
Ideally, they would like to hire only Java or only C# developers and have those developers be able to manage all of their code.
And how many operating systems other than Windows have C# ?
Plus, it does not have that archaic semi-colon that we can't seem to get rid of.)
VB also has a superior case/switch statement.
Give credit where credit is due. Even if you hate VB, you have to admit that it has some nice features that Java creators ignored.
I doubt that this qualifies as objective since it is my personal opinion, but I hope it isn't cliche-ridden.
There are several features of Java that I really miss when I have to code in C or C++:
Class.forName
To dynamically load a class, I just do Class.forName(classname). Combined with the Factory pattern, this makes it much easier to create pluggable implementations. You can still do that in C++, it's just harder.
exception.printStackTrace()
C++ has exceptions, but you can't get a stack trace on-the-fly from one. In a Java program, I can handle exceptions and log them to a database for later debugging. That makes it easier to find bugs.
Also, Java lets you know when you have the potential for unhandled exceptions (some people hate that, too, but I like it).
Built-in thread awareness
This one is probably closer to laziness, but I like being able to declare a method or block of code as synchronized, which is essentially the same as protecting it with a mutex. Using something like QMutex in C++ isn't really too much extra work.
Array bounds checking
This is another that C++ can do, but you have to do extra work for it. There are plenty of times when a Java program runs off the end of an array. Instead of giving me a core dump and killing the program (if I'm lucky), I get a nice little exception that I can handle. The same goes for referencing a null pointer (reference).
Garbage Collection
Okay, it's a blessing and a curse. On one hand, I don't have to worry about keeping track of references. On the other hand, you still get memory leaks, and your Java programs consume a lot more memory. Still, I really miss it when I start having to write destructors and copy constructors. In a large system, it is more difficult to keep track of who is supposed to free what memory. You end up using reference-counted pointers, which solve a lot of problems, but not all of them.
Reflection
I don't use reflection very often when writing business logic, but it comes in handy for writing frameworks. It is great to be able to dynamically access methods and fields at runtime (you locate the method/field by name, so it doesn't have to be known at compile time). Many of the networking and database frameworks use reflection to keep you from having to write tons of custom methods just to support the framework.
The libraries
Java has a great set of libraries that come with the standard JRE/JDK. While you can find the equivalent libraries for other languages, with Java you don't have to go searching as much. Plus, you know they're going to work when you move the application from platform to platform.
Java isn't perfect, the runtime is huge, the programs take a good bit of memory, swing still seems clunky to me, but when I have to do a large server application, I'd much rather be coding it in Java than C++.
YBT
Tablizer thinks everything should be a relational database and has a serious hair across his ass when it comes to Java.
Show me some objective evidence that Java is superior, not brochure cliches.
There's not going to be objective evidence of a subjective comment. "Superior" is ultimately a matter of opinion. I personally think python is the "superior" language of all those I have tried, but that's my opinion.
What I can say conclusively is that a programmer of equal skill in C++ and Java can write the same program in less lines of Java code. Java does lots of stuff "for free" that gets the job done faster, like memory allocation and garbage collection, and handling pointers transparently. If your goal is a good application written quickly, Java may very well be "superior" for your needs.
Another advantage of Java over other languages (except Perl and Python) is the huge and wonderful library of methods and classes. You can accomplish these goals with C or C++, but generally you have to go out and find the libraries to do what you want, then compile them for your particular platform. Java generally includes them, and for those that are not included, they're distributed pre-compiled for the JVM.
So it's not fair to say Java is "Superior", because that really depends on what you're looking for. If you're looking to build enterprise web applications, Java is likely superior. If you're looking to crunch numbers as fast as possible, you're likely to be happier with C or C++. It depends on the project and the goals.
- Vincit qui patitur.
come on! if there was a post in this story that deserves +1 funny, this would be it!
does this mean I can find Java development work again.
programming Java is like a walk in the park, without the hair pulling.
That's about EJB1.0. Now 1.1 is out if you like to write out your EJBs for complex situations (heavy stored procedure usage, etc...) and 2.0 is promising (I haven't used it a lot, yet, but where I have, I've been impressed).
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
This is typical Microsoft FUD. It completly ignores the fact that by licensing the right to build a JVM Microsoft had agreed to essentially 2 things: "Implement all of the JVM spec", and "Don't implement anything more than the spec". The first rule insures that Java apps written on other OSs will run on Windows. The 2nd rule insures that Java apps written on Windows will run on other OSs.
But many say that just because Java did fall flat on its face, and just because Microsoft pushed it a little here and there, one can't conclude that Microsoft deserves all the blame. Java, people point out, had a slow graphical interface and generally poor performance
This has more to do with perpetuating an impression that was correct 4 years ago than actual truth today. Take, for example, the programming editor Jext. I use it every day. It's fast, it works great, and it looks and feels exactly the same on Windows as it does in Linux.
On a recent programming challenge on coderforums.net a java program that randomized one million numbers and then sorted them ran faster than the same implementation in C.
"There's a lot of people who say that Microsoft wanted to kill Java" because it was "write-once, run-anywhere," he says. "But really, people at Microsoft just thought that was a ridiculous notion, and they didn't pay any attention to it. They said, 'For technological reasons, we don't think write-once will work."
More likely the truth is that "Write Once Run Anywhere" makes the operating system irrelevant. Imagine if people were able to buy a product with one CD that would run on Windows, Linux, Mac OS, IBM's AIX and Sun Solaris. People would be able to make a decision on what operating system to use based on the merits of the OS, not the availability of software.That is what scares the hell out of Microsoft.
There are several features of Java that I really miss when I have to code in C or C++:
C/C++ suck also. The C/C++ family is the "modern assembler" language. It is fast, lets you get close to the hardware, but the tradeoff is lack of some "automatic" features like garbage collection and bounds/range checking.
As I understand it, you have to use modified versions of the languages if you want to get "verifiable" bytecode... that is, bytecode which users can verify is safe to run even if they don't trust the source. This mainly means restriction of raw pointers and some other things. I'm pretty sure you can compile standard C++ to unverifiable CLR code... or, at least, it is technically possible.
If you're looking to build enterprise web applications, Java is likely superior.
What exactly is an "enterprise web application"? Large dynamic websites have been built with Perl and PHP.
Please, somebody define "enterprise app". The best definition I can find is "an intranet/B-to-B application where PHB's spend a lot of money because they think that's what you do to build intranets/B-to-B apps."
What I can say conclusively is that a programmer of equal skill in C++ and Java can write the same program in less lines of Java code.
C++ is hardly the cream of the crop to compare with (except maybe for raw speed). "Java is better than C++" does not ring loudly to those who don't like C++ to begin with.
Table-ized A.I.
That's exactly what always turned me off from Java. There's one spot in the Sun Java book (Core Java Vol 2) I have that compares equivalent code between C, Perl, and of course Java. The code implements a proxy server. The C code is the longest, pretty ugly, but fast as hell I'm sure. The Perl code is the shortest, not very complex, and relies on a regular expression to parse the request. The Java code isn't much shorter than the C code, plus it's THICK code (you know how Java programs have variablesThatDescribeEveryLittleThingAboutThem). Of course, they sum it up with a quick little explanation of how the C code is too long, the Perl code they describe as "completely unreadable", and show the example of the one regular expression in the Perl code to back this up. They try to explain this line of code then add in parentheses "No, we didn't figure that out ourselves. Like everybody else, we copied it from another script."
WTF is that? There was one -- ONLY ONE -- regular expression in the entire Perl script. But of course since the authors will be appealing to people they figure won't understand regular expressions yet, they can win them over by pointing out the ugliness of that one line.
I nearly burnt the book after reading that one (I collect old books, so that expression doesn't come lightly to me). If you Java advocates want to win people over, you should start doing it on the merits of the language, not by bashing others. It just makes you look ignorant.
I can code "enterprise" apps in lots of languages other than Java (and no, they aren't C#, C#, and C#). It comes down to the right tool for the job, and each language has merit. That's why Perl isn't far behind Java, and C is still popular today, so many years later.
putfwd.com - 1GB Free file storage with a twist
While many have their doubts about Swing and the notion of JIT compiled bytecode being a memory hog and a bit sluggish on the client side, there's some good stuff being developed:
The Eclipse project is working with the SWT which uses the native widgets of the host operating system, to provide a good responsive GUI
http://www.eclipse.org/
Companies like Excelsior are producing native compilers which speed things up (and reduce memory consumption) even morseo. JET also supports SWT, giving native compilation combined with the host OS native widgets. In some cases, you don't even need the JRE for your compiled Java apps!
http://www.excelsior-usa.com/jet.html
its unfortunate in a way, but i'm convinced that c# is the new java and it is indeed too late for java. Also, its interesting to note that even though we could write a compiler for any language that put it into java byte code (and indeed some have done it), we have to give microsoft some credit because they actually DID this for a number of languages for their .net framework. This coupled with the amazing visual studio .net will make the .net framework and c# the standard in the forseable future I think.
Its sort of a shame to see Microsoft come out on top for this one, since they didn't exactly play nice with java.
Hardly the same thing.
[Cite]: Office 11's file format
For me, one of the strengths of Java is the huge class library that comes with it. Ever tried cross-platform code in C or C++?
Java is hardly "cross platform". IBM is trying to overhaul the GUI so that Windows users get decent performance/behavior. If you ingore the GUI, then there are many languages that run the same on lots of platforms.
The GUI library/engine should NOT be language-specific anyhow. Why should we have to pick one particular language to get cross-platform GUI's? GUI != Language.
Table-ized A.I.
I know I'm probably missing his, but here's how I view his decision to go with .Net/C#:
.NET and it's VM are dependent upon MS's decision to release a VM. Yeah, you could write your own, but what if MS invokes the DMCA and prevents you from implementing a "full" VM due to patents and the like? Then you're screwed, writing applications that run on a perceived "broken" VM that lacks those things that MS has deemed fit enough to lock in. "Yeah, great, OpenSource to the rescue, we'll port our VM to every platform!" Sure, and getting people to use it? Good luck. Tell Joe IT Manager that he can use a "free, OpenSource VM" from a bunch of anonymous guys on the internet or the "official VM" from MS, what's he gonna pick?
/. comments, etc that do a good job of explaining all of that, but imagine this:
MS made the "important stuff" standardized and "open." It still leaves MS in the position to close off the rest of the "non-important" stuff and that could break compatability. If you're looking for "cross-platform" advantages,
And that leads us to:
The key is to ultimately remove the dependence upon MS products. We've all stated that time and time again. People run MS for Outlook. For Exchange. For a relatively easy sytem to administrate and patch. For Support. There's a million and one papers, editorials,
What if Evolution had been written in Java? OpenOffice, if I'm not mistaken, is written in Java and if I must say so myself, it runs VERY nicely on my machine and does everything I need it to do as an Office Productivity Suite. With OpenOffice, you see lots of people switching from MS Office, avoiding the licensing fees and troubles, and generally LIKING it (there are exceptions.. there needs to be a nice Access competitor or at least a great frontend for something like PostGRE or the like). That's one less reason to use MS, right? Great! OpenOffice runs on Windows, Sun, Linux, OS X (with X11 installed). Most importantly, see Windows? Millions of people can now look forward to using that $500 they'd spend on Office to doing SOMETHING ELSE with their money. Millions of companies can still do business without outlaying a chunk of cash for Office. There's the example.
Now, back to Evolution. If Evolution had been written in Java, like OpenOffice, you wouldn't just have people on *NIX platforms using it. No, you'd be able to use it on Windows, the biggest, most important, and most influential marketplace in the computer industry. What would that mean? Let's say you're Joe IT Manager. You've already switched your desktops to OpenOffice. Now, you could replace Outlook with Evolution, on your Windows systems at work (and saving on the licensing, to boot!). See, it's hard to convince upper management to switch to Linux whole-hogged. But if you do it, one app at a time, eventually you run OUT Of reasons to continue to pay the exorbitant licensing fees to support an Operating System that you no longer need to run the apps you run. Dig it? Dig it! Your users use the new apps, already acclimated to them. Change comes slowly, and for the better. And all that time Ximian spent on working on MONO could have been spent tweaking the interface, developing advanced calendaring functions, developing server-side calendaring/schedule making software, etc. And then Linux slips in quietly through the back door and MS is left to send armies of marketdroids to help woo the companies back, losing their marketshare inch by inch.
I may have Ximian's and Miguel's intentions completely wrong. Linux "desktop" penetration may not be his ultimate goal, although as a Linux vendor it might behoove him to think this way. Linux is inching it's way into the server rooms of corporate America (and the world), and the desktops will be a hard fought battle. Java is the kind of technology that allows you to provide the replacements that will make the transition EASIER.
To conclude, I applaud Miguel for his hard work on MONO (and Evolution, it does fucking kick-ass). Unfortunately, I think it's misguided and ultimately futile.
If you were me, you'd be good lookin'. - six string samurai
Halcyon changed it evidently to a middleware which converts ASP to Java. I don't know why they dropped the VB compatible source compiler. I think it would have been a terrific product had they released it since all the VB coders would have been able to code on multiple platforms with no learning curve. It would have been a huge market for them too, so I would love to hear the real story behind their dropping it.
They have since merged with a company called Stryon if anyone wants to check it out.
Microsoft jumped on a rather interesting point in their new CLR environment- if the API is universal at the bytecode level, then you can build up many languages utilizing the API and compile them down into one common bytecode. This does offer many forms of interoperability between the languages, but the question of whether or not you really want to do that comes into play. This may just be my own myopic opinion, but it seems to me that that the multi-language promise of .NET has the same promise as that of the Tower of Babel...you're going to be able to get started just fine and build things beautifully for a while, until your effort is crushed by a confusing mess of different languages.
This might have not been a really big deal if it were just VB, C#, and ASP, since they all share so many similarities, but add in "managed C++" and COBOL, and give all of these languages roughly equal footing to what they're capable of, and your development team is going to be in a position of coding anything they like in whatever language they want, and that's going to become a confusing mess to maintain.
Now, before I say anything further- YES, I am a Java programmer. I also program in C, C++, and Perl, though...I just don't get paid to do those. I like Java, but I don't think it's the messiah of languages. I will say, however, that I like it because I find it easy to code in and that, in my personal experience, fewer people have wrecked my day with bad Java programming than with C or C++ programming, and that makes it a pleasant "headache free" language for me. Since it's so "headache free", and because I can do so much with it, I often default to using Java unless there's a reason to do otherwise.
Now, since I've given what is probably my ignorant and unsolicited opinion on .NET and on multi-language runtimes, let me throw out another ignorant and unsolicited opinion. To put it shortly, I think that bytecode interpreting runtimes are really going to take over in the future of programming.
If there's one thing I've forever loved in Java that I wished I had in native code languages, it was the ability to, without care of the implementation details of some remote system, load and bootstrap executable code from that system. C and C++ have dynamic resource loading capabilities, but I just don't find them as flexible as dynamic class loading in Java. I've looked at LAM and MPI and I've programmed in CORBA...all of these different technologies seem to have one thing in common to me- they struggle to put a common veneer over different machines so that they can be used together. I like MPI quite a bit, actually, but when I look at the ease with which I can create distributed services in JINI, the distributed options for native code languages just don't seem that great. The bytecode interpreting runtime (the JVM or the .NET CLR) is its own veneer over a machine's actual native operations, and so chunks of programs can be more easily exchanged, bootstrapped, and executed on disparite machines. From the heterogenity comes the power of very flexible dynamic loading of runnable code, and such a feature seems to me to be extremely important in creating distributed systems.
Again, I'm not saying Java or .NET is going to take all or be all. Honestly, I'd like to see these two bow out in a few more years and make room for a runtime that picks up where they leave off, because they both leave things to be desired. Also, rock solid native code languages are still incredibly important...not only are they necessary when you need more raw machine access, but how else will everything that bytecode languages depend on be implemented? And, of course, scripting languages that allow for fast and effective programming will be perennial.
But I think that the future of quite a bit of programming, especially a lot of business applications programming (which, at least in my experience, relies increasingly on distributed systems), is going to start going to virtual machines interpreting bytecodes.
I'm sure I'll get flamed for this, so please have at it. ;)
Tablizer thinks everything should be a relational database.
If true, how is that more evil than thinking everything should be in Java application code? Why is my everything-isa-X more evil than your everything-isa-Y?
At least let the database do what it is good at: managing boat-loads of attributes and the relationships between them. Code sucks at that, at least for me. Code is too linear and static. Databases allow you to sort, filter, cross-reference, etc. all that info to more easily find and view what you need and only what you need. Sure, a fancy IDE can come close, but only by reinventing the database by making classes into an internal network database. Thus, you end up reinventing and/or using a database one way or another for larger apps. You might as well do it right rather than stumble upon a crippled version of it the hard way.
Table-ized A.I.
There are plenty of times when a Java program runs off the end of an array. Instead of giving me a core dump and killing the program (if I'm lucky), I get a nice little exception that I can handle.
Really? Java makes it so easy to know the length of an array that I would think over-running it would be a relatively rare occurrence.
where there's fish, there's cats
I'm a long time (meaning 7 years) Java programmer and I have recently been learning Objective-C and Cocoa. On a whim I decided to use the Java bridge and I was really impressed. I see it as a perfect solution for creating a slick desktop app on the Mac that can benefit from some Java-specific capability.
-- Solaris Central - http://w
Sure, other languages have great libraries, and they are great languages too. My point was in response to your comment "What exactly is there in Java that allows one to build "complex applications?".
Okay, let me reword it: How does Java allow one to build complex applications BETTER than all other languages? IOW, why the hype?
What is so special about Java that is allowing it to be the New COBOL? Wait....I just answered my own question. Nevermind.
Table-ized A.I.
So speaking as a nominal expert, while you certainly can translate non-Java languages into bytecodes, the machine clearly isn't designed to be general-use. It has a lot of object-oriented instructions that fit the Java object model and not a lot else. You can adapt them to your language, or you can ignore them and code everything up as one big method call (except that you'll run out of space, since function size is limited, and you can't modify it once written).
I've successfully adapted languages like Prolog and Lisp, and taken advantage of Java objects to provide the continuation-like features of these languages. I've even found a couple of places where you can generate code which could not come from Java code but which is legal and verifiable (e.g. crossed loops).
I use it mostly for small projects. For example, Ontology Works generates Java APIs for its custom database description languages. It generates the bytecodes directly, since the APIs are too large to be conveniently compiled from Java. But that's not a general-purpose language, so the code is actually fairly simple.
I've only glanced at CLI, but it appears to be somewhat more general purpose than JVM bytecodes. (In the end it's all Turing tar pit.) However, CLI a bit more heavily oriented towards calling out to native code, which makes the code less portable and harder to optimize. The JVM also supports native methods, but they receive a lot less encouragement.
Mostly, I'm a huge fan of the way JVM does verification. It's brilliant that you can restrict code to safe code and still be Turing complete by eliminating a large class of safe-but-invalid instruction sequences. You can make huge optimizations to verified code that you can't make to generalized code. Verification also allows much more fine-grained authorization than the Microsoft way, which is all based on signed code.
You always want to choose the best language for the job. C/C++/Java are largely identical, and I think in general a group should pick one and stick to it. But there are languages (Lisp, Prolog, Haskell) which are genuinely different, and I consider it a good thing that you can write compilers for them. That has yet to completely fulfill its promise on the JVM platform, where there are proofs of the concept but they are little used.
Backing up your claim is a guy who repeatedly says his benchmark is "just for fun" and "a work in progress" and is humble enough to try and discover his own shortcomings:
m l# flaws
http://www.bagley.org/~doug/shootout/method.sht
You can get benchmarks to prove anything, e.g. turn on fast floating point switch (completely unacceptable for some things) and sure, then Java's speed approaches C or Fortran. By the way, I couldn't find anything indicating what compiler switches this guy used (admittedly didn't look hard).
Your point about speed of development is a very good one.
I am currently developing a custom database and data collection package that MUST run both on Linux and Windows 2000. As well as the intrinsic functionality, it has a significant GUI component as well. Equally important, I don't have a lot of time to get it done. I considered many options, including C/C++ with QT, vxWindows, GTK and other "cross platform" toolkits, perl, and others. In the end, Java won the day for several reasons:
1. Java plus Swing is the closest to truly cross platform of all of the options. I have written around 6000 lines of code so far and less than a dozen have to be changed to account for differences between Windows and Linux, even though the program does some relatively low-level things like directly accessing modems through serial ports. In addition, the Swing GUI looks EXACTLY the same on all platforms. GUI toolkits which try to give you "native" L&Fs often need tweaking between platforms to look good. Once you get a Swing GUI looking good on one platform, you're done.
2. Java has an extremely complete and easy to use interface to SQL DBMSs (JDBC) which works the same on all platforms.
3. Sun's online documentation is very complete and easy to use (this can be a big plus with speed is important).
3. The higher level nature of Java compared to C/C++ (e.g., automatic memory management, better runtime checking) make for extremely quick debugging. I am achieving operational code with many fewer iterations than I ever did with C/C++. Java may be slightly slower than C++ because of these features, but this particular program is not pushing the performance envelope, so the faster development time is much more valuable.
This is the first sizable project I have programmed in Java, and overall I'm very happy with the results so far. A year ago, that's something I'd never have guessed I'd be saying.
So what stops Sun or somebody else from doing a Java.NET?
"Enterprise app" (My definition):
An enterprise application is one with multiple components, geographically distributed, using multiple protocols and techniques to integrate the activities of a number of different people and/or departments.
A good example would be an application in which clients can submit orders/requests via a web page, adding an order/request record to a database. This stage uses a web server, middleware, and a database server. The next stage is one in which an employee of one department interacts with the record using an intranet or client-server application. This stage could be repeated in several departments, like order intake, shipping, customer service, etc. Another stage is one in which whatever the client requested is actually delivered. This could be handled as part of the previous stage, or maybe be its own stage by involving an outside party like Fedex and personal handling of the order/request by a live person (a sales call, etc).
So, in my view, the basic idea is that it's a company-wide system which involves a bunch of departments, potentially more than one database, clients, employees, and interested third parties.
What do you think, guys? Is this a workable definition?
Farewell! It's been a fine buncha years!
Greetings Tablizer,
I've read many of your posts here on Slashdot as well as your web site. I've found your arguments to be well-written. However, many of your arguments are as subjective as some of the posters here. You say in your own writings, in fact, that you have difficulty thinking about things as objects with behavior. And that, in my _opinion_, is what it's really about.
Programming languages should be built for people, as they represent a communication channel between people and computers. Software texts often must account for communication to other humans, hence the need for comments.
Experienced language designers take this into account. Their experience also leads them to add things to the language to prevent or at least deter common mistakes. Those "good features" in Visual Basic you mention, have produced a history of unreadable and buggy code.
Where would you suggest today's application programmers spend their time? Is it more valuable, more marketable to learn a single OS / OE, a single database (and be a one-trick pony), or should they spend their time on learning a single, rich API that applies to multiple platforms?
I'll make no pretenses that Java is more machine-efficient than C, or that O/R mapping is faster than embedded SQL. I will say that I find domain logic easier to unit test in isolation when you use an O-O domain model with mapping. These test can be automated and even serve as a kind of usage guide to the software.
The point of this is, the Java language has an accepted and refined way to work at a reasonable level of abstraction. If machine-efficiency were always 'better' then we'd all use CPU specific assembly languages.
BTW: The popularity metric does have merit as an argument. Popularity leads to communities. Communities can work together to advance the state of the practice, to share techniques. You complained about this very fact in your essays. 'Not enough people are contributing to the advancement of Procedural/Relational practice,' you said. I believe you are correct, and the reason for this is industry support and community.
Regards,
Michael Murphree
The opinions expressed in this post are my own, and not necessarily those of my employer.
in business, when one enters in to a contract, one is legally required to abide by its terms. The judge just made Microsoft do what they were already bound by contract to do. C# and .NET are just an attempt to further lock people in to Microsoft operating systems.
Swing GUIs are as slow or as fast as you make them. As others have said, if you write crap code, then of course it is going to be slow! You can do the same thing in any other language. However, if you truly understand the Swing API and the Java language, you can write GUIs that are just as responsive as native applications.
This was not always the case, but it is reality now. Unfortunately, it is going to take a few more years before the bulk of the Java programmers out there learn how to properly code a Swing GUI.
seSales, Point of Sale software for OS X.
...other programming languages still run relatively faster than Java...
*sigh* Repeat after me: languages don't have speeds. You can write programs which run quickly in Java. You can write programs which run dog-slow in C.
A well-written Swing program is plenty fast, and (in my experience) virtually indistinguishable from a "native" application once you get past around 500 MHz.
Of course, most programs (Java or otherwise) aren't well-written. But don't blame the language because you can't use a profiler.
When can we expect to see C# compile for JVM? And when can we expect to see Java compile for .NET?
FRA: STFU GTFO
Are you kidding? How about an extensive, reliable, tested library of networking, user interface, and I/O code which can be used to create "complex applications" extremely easily.
Tcl has had that for years. So does Python. Java has its good points, but they are buried under the piles of steaming 'hype', or to put it a different way:
"It has been said that java is great for engineering next generation solutions to enable maximization of developer income by means of enhanced buzzword use"
http://www.welton.it/davidw/
Swing might be slow, but Swing is not your only option with Java. IBM recently introduced SWT (Standard Widget Tookit).
W T- Design-1/SWT-Design-1.html provides a brief introduction.
http://www.eclipsecorner.org/articles/Article-S
SWT is definately faster than swing. Additionaly SWT is cross platform.
I know it might sound unslashdotish but I prefer a graphical editor for building GUI's. There is currently not a free IDE that supports graphicaly editing SWT. I'm really hoping someone is working on one for Eclipse.
While you're at it go ahead and check out Eclipse too, it's great. There are already all kinds of plugins available for it (UML generationg, etc. etc.) Java on the client side is real and picking up steam.
(Insert Clever Sig)
I have been working on Kawa since 1996. Originally it just compiled Scheme to bytecodes, but it is now a multi-language framework supporting XQuery, Emacs Lisp, some Common Lisp and other languages. It is easy to compile any of those into modules, applications or servlets. These days I'm mostly working on XQuery, a very interesting and useful new language from the W3C.
gcc IS licensed under the GPL; programs compiled with it are not derivative works of the gcc code at all, except for small bits of inlined code -- and there is a specific excemption in the gcc license to allow that (as with most compilers; that's not a GPL-specific issue).
Presumably a GPL-ed Java environment would do the same. The GPL really isn't as horrible as some people make it out to be.
But, yeah, ECMA-Java would be a very, very very good thing.
DNA just wants to be free...
It's not better in all ways than all other languages. I don't think anyone would argue that point (ok, maybe Scott McNeilly..but not James Gosling).
The great thing about it is its extensive library, which alongside things like garbage collection and exception handling make it relatively simple to build a complex enterprise application, and by extension less expensive. I think mediocre coders (who will cost companies less) can build more robust apps in Java than other popular languages.
In my line of work I need to deal with binary data structures received over UDP/IP from DSP based systems. A lot of the data structures contain 16 bit signed and unsigned fields (it's a 16 bit DSP, so this is natural). These can be directly represented as records or structures in languages such as Delphi or C++, but a business associate using Java must use all sorts of tricks to access these fields.
From my research on the CLI it seems to have instructions for 8, 16, as well as the common 32 bit accesses into arrays and structures, as well as the support for unsigned data as well as the common signed data.
This may be one of the main reasons that Borland is coming out with Delphi and C++ compilers that produce CLI, whereas they never did so for JVM.
You've been able to compile java to a static executable for years with most development environments. First there was Symantec, then Microsoft (who licensed Symantec's stuff)... IBM's Visual Age can do it. TowerJ is well known for their native compilation and speed.
And now there's gcj.
No native compilation indeed. Where have you been for the last five years?
- I don't need to go outside, my CRT tan'll do me just fine.
VB also has a superior case/switch statement.
How do you code a case/switch statement in VB with "fall through." Yes, sometimes you actually need this!
MS has always claim MS.net was language agnostic where Java was Java centric.
.net, ie languages with same design scope, ways of thingking etc ... but some are nothing to do with the way you thing in Java.
.net over Java, i can just tell you this is wrong. The designer of .net just did a clone. And even if it has som small differences, who said a clone was a duplication ;)
.net whereas other big buys push Java ... If they had to install the Java platform on Win32, then everywhere you will have Java, and whatever they wanted to, the fight will be over .... and MS.net dead-born ...
:(
This is nothing but a lie, several languages have been developped to compile to the Java platform (Java bytecode+JAva API) and one of the best was Eiffel ! It was done long time ago, ever years before MS decide to get rid of their Java VM (jview), Java Windows APIS (WFC) and JAva IDE (Visual J++) to start the famous project code named "cool" (now ".net").
Of course Java language is the primary language of the Java platform just as C# is the primary language of MS.net. Take a look at VB.net and you soon notice that it is not only a cosmetic change over VB6 : 100+ new keywords, complete API changes, new full object (CLR related) philosophy,... VB.net is nothing but a new language shaped for the CLS and linked to the CLI ! In clear world, if you are not used to full object oriented design you could find trapped yourself soon or later !
About alternative Java platform languages, see
You can the whole list here !
Most of them are like all the C# flavors to
One of the best is kiev, that add prolog rules which make an enormous change to the design rules (who said backtracking sx?). An other named OpenJava, has build a newt dynamicity level to compile language using the MOP (meta object protocol) that is the most impressive stuff ever brought.
Ok, now you now that multiple languages are existing on both sides. But guess what ? I do thing that multiple languages are no a graal.
Let me explain, if the languages are bijective (ie same scope, same stuffs), then there is no special reason you should consider using a language over an other. Let's take MS.net, all the languages are bijective (with exclusion on certain fonctionality usable only in C#), that means only one is usefull. Why should people have to learn 5 languages to read a project sources ? Why should enterprise invest in 5 languages training ? There are no reason at all ! This is the reason why MS know that C# will be the only surviving middle term language (why would you choose a language where less stuff can be done). The same thing apply to bijective Java languages !
In clear words: C# is the only valid language for MS.net platform and Java language is the only valid language for Java platform !
But point is that there are languages aimed at the JAva platform that are not bijective (OpenJava, Kiev). Because they add major features and new design concerns.
Whatever MS claimed superioritty of
MS is worry and they do FUD, just because they've realized they trap themselves by doing a Java clone instead of continuing their leadership on the Java platform (remeber the 98' when both MS VMs and IDES where JAva leaders ?).
If Java get to the client side then we could have a drastic shift of platform and this could endanger the client side domination of Win32 within the next 5 years !
You could laugh at those statement, but the past year has prove that MS is now alone on pushing
Poor little MS
"(although KDE3's stupid mouseover-activates-form-elements user interface, now finally fixed in the latest versions, has to take some blame too). "
;)
"It is a poor workman who blames his tools"
The Kruger Dunning explains most post on
I can code "enterprise" apps in lots of languages other than Java
What is exactly is an "enterprise app"?
Where you need a case statement, your design is telling you that you omitted a method.
Check out the heavily overlooked java bindings for KDE and Qt, they are very impressive and the programs resulting from it are very fast!
However, many of your arguments are as subjective as some of the posters here.
Indeed. Often hype is caused by people selling personal preferences as universal truths.
But if it is all subjective, then why should the market pick your subjectivity over mine? Do some programming psychology research and surveys if you are going to use psychology to justify pushing certain subjective standards. Otherwise, fads and hype will be in the driver's seat.
You say in your own writings, in fact, that you have difficulty thinking about things as objects with behavior.
No, I don't think I said that. One can indeed model things like that, but it is not a realistic nor flexible model IMO (except maybe in physical modeling, where OO was born).
The point of this is, the Java language has an accepted and refined way to work at a reasonable level of abstraction.
I don't see that. What I see is a jillion methodologies. The task-in-code-and-nouns-in-DB organization of procedural/relational is both simple and powerful in my observation. BTW, abstraction is relative. Most philosophers will attest to that. OO tries too hard to find "global" abstractions, which is a dead-end endevour in the longer run (IOW, future maintenance headache). The ad-hoc abstractions of relational are better in this regard IMO.
The popularity metric does have merit as an argument. Popularity leads to communities.
AKA, the "QWERTY" argument: Keep inperfect standards because at least they are standards. This is why Java is becomming the new COBOL. COBOL was surrounded by superior languages, but none of them ever found the momentum to jump COBOL's entrenchment.
Table-ized A.I.
That's why we both put it in quotes. :)
putfwd.com - 1GB Free file storage with a twist
At my company, "nterprise" means supported software with automatic failover, guaranteed uptime, and linear scalability by adding more servers and CPUs.
That means that session data has to be either shared or stored (which means the application servers have to be clustered), or you have to set the sticky bit on two cross-linked load balancers (which is not an option in many cases since Foundry Server Irons cost $30,000 apiece and you need two so the irons can fail over too).
You can't do that with Perl or PHP as far as I know. Enterprise has nothing to do with size or features, it is all about consistent performance, uptime, and failover.
- Vincit qui patitur.
How do you code a case/switch statement in VB with "fall through." Yes, sometimes you actually need this!
Show me an example. Note that in VB you can put *multiple* matches per case block. IOW, sets. Thus, rather than "fall through", you list the multi-item set. I don't know if it is faster, but it is better software engineering organization.
Now I may sound like an idiot for saying this, but java never made sense as a server-side language. It wasn't designed as a server-side language, it was designed as a client-side language. I've never really understood why people say "we use java on the server because it's write-once run-anywhere." It doesn't make sense: on a server you have complete control of the hardware so compiling to machine code is both possible and good for performance.
I guess you've never had to support mulitple servers... Not every company uses one server for everything. Under one vp, they buy a Sun. The next one comes in, they buy an hp. Maybe somebody else brings in 3 Windows 2000 boxes... Do you really want to compile, test, and support your app in each environment?
Anyway, I have a fairly large app (no gui) that I develop on NT, test on Linux, and run on Solaris, Linux, NT, and Windows 95. I don't have to do anything to make this work. It just works.
This isn't any ordinary darkness. It's advanced darkness.
Where you need a case statement, your design is telling you that you omitted a method.
The 'ol "subtyping is better than case statement" argument. The argument is usually flawed. It assumes a certain regularity and never-growing method count that is only found in cliched OO books. Fairy tale examples.
I haven't seen anyone mention JPython (basically python that generates java bytecode).
Lodragan Draoidh
The more you explain it, the more I don't understand it. - Mark Twain
http://jruby.sourceforge.net/
JRuby is a pure Java implementation of the Ruby interpreter.
JRuby is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application.
An enterprise application is one with multiple components, geographically distributed,
If it is on the Internet, then why does it have to be *geographically* distributed? Just make one big-bass server room running things like Oracle somewhere in Denver. That way you don't have to duplicate similar configurations and setups all around the country (or world). (With off-site backups, of course).
Smells like a conspiracy to sell duplicate Sun-boxen to me.
Table-ized A.I.
Sam Gentile wrote the following:
/ in tromcpp.html
.NET code and enable access to the functionality of the .NET Framework. They include a set of Keywords and Attributes to extend the C++ language to work with, and generate, managed code.
http://www.ondotnet.com/pub/a/dotnet/2003/01/13
What Exactly are Managed Extensions for C++?
Managed Extensions for C++ are extensions to the Visual C++ compiler and language to allow them to create
******
Therefore Managed C++ != C++
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
Java has a great set of libraries that come with the standard JRE/JDK. While you can find the equivalent libraries for other languages, with Java you don't have to go searching as much. Plus, you know they're going to work when you move the application from platform to platform
STL? Also theres tons of sites that distrubute libraries and code. Maybe you dont have to search for libraries in java.. if you are familar with them. But the same can be said for any language.
The platform to platform point is a good one. That falls under the general advantage of java, not libraries though.
Selling software wont make you money, selling a service will.
since Foundry Server Irons cost $30,000 apiece and you need two so the irons can fail over too). You can't do that with Perl or PHP as far as I know. Enterprise has nothing to do with size or features, it is all about consistent performance, uptime, and failover.
In that case, use IBM mainframe technology. They still have the best uptime and failover records out there. (I don't know how easy/reliable it is to run Java on mainframes.)
Table-ized A.I.
Show that Java is better than C++ and get a "5" rating? Shows how fucked up slashdot moderators are.
Re regexes and the hype against Perl: it gets ironic when you learn that JDK1.4 ships with its own regex engine.
Not that I care all that much for Perl, but regexes are probably the single most useful programming tool I've had the pleasure of dealing with. Anywhere.
If it is on the Internet, then why does it have to be *geographically* distributed? Just make one big-bass server room running things like Oracle somewhere in Denver. That way you don't have to duplicate similar configurations and setups all around the country (or world). (With off-site backups, of course).
I think he means that the *clients* aren't all in the same building, on the same LAN.
Smaller companies (and individual departments within larger companies) have traditionally been able to make do with solutions that require all the clients to be on the same LAN as the server. Think of an MS Access database on a Windows shared drive. Or a desktop application that directly talks to a database server. This kind of thing doesn't scale up to the needs of a huge corportation, and especially can't handle transactions between multiple different ones.
where there's fish, there's cats
If it's going to get bigger for phones, it's got to be faster. Have you ever tried to use one of these T68s? It takes 15 seconds to bring up the phone book.
Well, I am not a java programmer, so I don't know about java, but It seems to me that you are using C arrays in C++. The STL provides several data structures that are indended to replace C arrays. These include vector, and list, both of which dynamically allocate their size and automatically resize if you overflow thier bounds:
int main(){
vector<MyClass> vec_myclass;
MyClass temp;
ifstream fin;
while(!fin)
{
fin >> temp;
vec_myclass.pushback(temp);
}
cout << vec_myclass.size();
return 0;
}
The user doesn't even need to check the size, although that is provided.
...interesting if true.
However, if you truly understand the Swing API and the Java language, you can write GUIs that are just as responsive as native applications.
That can probably be said about *any* complex technology that mostly sucks.
I've read a little about the different languages that are available for .NET and I've used J# before. What I found out was somewhat disturbing and can be found documented out on the web in several places. First, it is clearly stated by MS that the intent of J# (and other langauges available on the .NET platform) is not to be able to use JAVA as you would in its "natural habitat". They'll admit that basically they wanted to allow programmers that were familiar with the *syntax* of JAVA to feel comfortable on the .NET platform. They even provided something that resembled the JAVA class library, but is horribly out of date. Why? Because they don't want you to use the JAVA class libraries, they want you to use the .NET class libraries. The version of Java's libraries they provide is intended as a stepping stone as you port your app to use the .NET libraries. When you hear MS talking about being able to use smalltalk (or whatever) on .NET they're not talking about using smalltalk with its class library (although one may be provided by MS or a third party), they're talking about using smalltalk-ish syntax to make .NET library calls. This is also why you'll hear people who understand what .NET is calling it "themes for languages" - it merely a superficial thing.
Java has made more inroads in the server room than it has on the desktop. Almost everyone will agree that applets were a huge mistake. Many others will also agree that AWT is not really a very good GUI development library. Fewer still (but I'm guessing still a majority) will express distaste for SWING. Minus the people who just don't like SWING because of the nasty metal theme, and then you loose that majority.
Then, talk to those people who've done J2EE, JSP, and EJBs for a large project. That's the crowd in whom Sun has invested correctly, and that's the crowd who'll sing Java's praises for years to come. It truly is good stuff.
You can use a hammer to pound in a screw, but a screwdriver is better for the task. Don't criticize Java for being a bad screwdriver. It's a damn good hammer.
Show that Java is better than C++ and get a "5" rating?
/.
Yip! Showing that Ford Pinto's are better than Yugo's is a sure road to Karma Heaven on
If the obvious way (and thus, the way most programmers will do something) is slow and inefficent, then your API is flawed. And anyway, since Swing (of neccesity) will use the native API to draw it's widgets, you're very dependent on the Swing implementation in your JVM. The Windows one has always sucked. In the future, this may change, of course. If you want Java GUI apps to get a better reputation, the the Swing API needs to improve so that it's standard usage is at some level better than "total ass".
I always thought that this would be a good application of Transmeta's "Code Morphing" technology. If it can provide an x86 translation layer then I would think java would be an obvious next step, and all (most?) of their optimization techniques would still apply. Of course, if that were true they probably would have done it already, so I must be missing something.
Move on. There's nothing to see here.
The T68 does not use Java. It is written in C and C++.
Our mainframe sucks ass. And it's really (really!) expensive. It would be cheaper to just throw dozens of PC servers at the problem, and we'd get better performance.
Man I wish I had a mod-point for you. Well said.
In the early 90's, I had to port an application server from AIX to Solaris ensuring common source base.
It took us ~ 6 months to completely port and test the server.
Later in 1999, we rewrote the application server in Java using Solaris as the target platform.
Since then, we are running under AIX and OS X, without a single line of code change.
An interesting observation is that the hardware platforms/OS(AIX->Solaris->OSX) have changed multiple times for our company but the applications remain the same. Thus it paid off tremendously by going with Java.
I used to teach J2EE to wall street developers, and in particular new college grads. Most have no clue what an enterprise application is, so I came up with a working definition.
Enterprise application is a software system that is:
1. Distributed (with all the requisite problems of distributed computing)
2. Secure (authentication, authorization, auditing, and encryption)
3. Scalable (can handle increasing load without a re-write)
4. Heterogeneous
5. Fault tolerant and/or Recoverable
6. As a corollary to (5), usually involves one or more transactional DBMS
Each of these topics by themselves can take years to master.... which is why people tend to hold well-designed "enterprise applications" in high regard.
-Stu
Hmm, maybe my sources were wrong. How do you know this?
I've always thought the negative press about Perl came from two sources:
1. Academics, who see Perl as the new BASIC. Perl wasn't designed with a lot of the "principals of language design" or whatever they're called these days. It's not orthogonal, it's a relatively modern language that isn't OO. It's not functional. Perl was designed to make simple solutions to common problems. Academics don't deal with common problems, so Perl is largely worthless in their eyes. People in the real world love it because they deal with common problems all day long and hate writing hundreds of lines of C/Java for every new problem. One particuarly telling example (in the Camel book IIRC) was dealing with regular expressions. In a "proper" language, you would not need the "+" (match one or more of the previous item) because you already have the "*" (match 0 or more of the previous item). Hence, a+ can be written as aa* and should be eliminated. In the real world, nobody wants to retype a 14 character token.
2. People who have never programmed in Perl hate it because it uses a lot of punctuation characters.
I read the internet for the articles.
when Microsoft does, where is the .net version of visual studio? (not something that can put .net out, but actually written in .net), where is the .net version of Office? hell, show me a serous piece of software microsoft is writting in .net, and if they arn't using their own language for a decenct sized project, I'm not sure why anyone else would trust it.
until they use it for some large scale stuff, it will remain broken.
Interesting points. Isn't Perl well-regarded in academic circles though? I thought it was doing quite well in areas like bioinformatics...
I think your point #2 is also exactly the reason why practical people love Perl. At first glance, it makes Perl a horrible read, but after you know what those symbols do, they're perfect. People think in symbols and patterns (judging from many popular alphabets at least), and learning a new set of symbols is a lot easier than it sounds. We do it all the time without knowing it (street signs, washroom signs, colours, icons, the washing instructions on the tag of your shirt, etc).
putfwd.com - 1GB Free file storage with a twist
"Enterprise App" is an application serving a need such that when it fails, financial losses are incurred.
I can't really disagree with you, but when we talk about Java, we should separate the issues:
Java as a programming language
Java as a computing environment
For the first point, Java is a fine programming language and has quite many advantages over C++, but it also has some disadvantages:
lack of generic programming; at least C++ has templates, which solves 90% of the problem; I have not yet a program that does not need to use arrays and lists of different types. Although Java uses Object, objects still have to be allocated on the heap with 'new', which is a waste of resources.
no stack objects; I don't know the internals of the stack management and the complexity of C++, but since C++ managed it, why not Java ? why should I have to create an object on the heap just to use it locally ?
no structs; some times I only want to bind together some data without the overhead of classes. I can't do that with Java. That means that I can't also have a binary package represented as a struct: in C/C++, I can cast the buffer pointer to the appropriate message structure and access the data (for example received from the network) with one call, but in Java I have to code a whole series of classes in order to convert a byte array to a message.
I don't know why the garbage collection is such an advantage. In the place that I work we have written apps with milions of lines of code using C++ and we never had a problem with memory leaks. Of course, being military and scientific apps, there was a good design before coding, so we had a pretty good knowledge of when to allocate/free stuff. But it is not hard to make C++ objects garbage-collected. All that is needed is a base class that upon its construction puts the object in a global list and a template pointer that increases/decreases automatically the reference counter of the garbage-collected object when assigned to it; later, the list will be traversed and objects with no reference will be deleted.
We have used Qt for our apps, and the speed of coding is similar to that of Java. We also have a Java department and we keep hearing design issues that are derived from the lack of certain features in Java, generic programming being the most serious flaw.
By no means am I saying that C++ is better than Java, the programming language. But the goals of the two languages are different. The big problem of C++ is the lack of standardised libraries for gui, multithreading, database I/O etc. Thank god for Trolltech that we have found a piece of code really worthy of its price, and that is Qt which solves all these issues (and many more).
For the second point, I don't like either interpreted or byte-code languages with virtual machines. I think they are a waste of CPU time and resources. I am 100% certain that there is no point in having static Java apps executed by a virtual machine: they are very slow, even with top-of-the-range Pentiums. And when we say slow, we mean slow enough for an experienced user to handle: for example, I have personal experience of a versioning and control application that we use at work which is very slow, although it runs on a P4 at 1.8 GHz. It may not be slow, but it definitely feels slow.
Another problem of C++ is that it does not compile the same in every platform. The Java's VM solves the problem, but is it really needed ? aren't programming languages invented for this exact reason ? other environments offer complete source-code level compatibility for every platform (for example ADA 95) without a VM. Why Java needs a VM to run static apps ?
a programmer of equal skill in C++ and Java can write the same program in less lines of Java code
The problem with your statement is that c++ is a much more complex language than java and a truly competent c++ programmer would find java to be easy to learn, while a programmer knowing only java would find it much more difficult to learn c++. It would be difficult to find a java programmer equally skilled in c++, but it would be easy to find a c++ programmer equally skilled in java.
T68i does not include any Java. That is a fact!
Would that be the IO library that was so good it was scrapped and rewritten last year?
creation science book
make it relatively simple to build a complex enterprise application, and by extension less expensive. I think mediocre coders (who will cost companies less) can build more robust apps in Java than other popular languages. Mediocre coders writing complex enterprise applications. Thanks for making me LOL today!
Try writing (let alone porting) an app that uses reflection in C or C++.
The usable, native compilation subsets of Java from TowerJ, Visual Age, Visual Cafe, gcj, et al. are still more complete than just about any other language out there.
I forget, where's the standard TCP/IP socket interface in C and C++ that works across all platforms?
For that matter, how many C compilers out there are 100% C99 compliant? How many C++ compilers out there are 100% ISO C++ 98 compliant.
I can't use reflection portably in TowerJ, but I can use threads, sockets, database connections, graphics, user interface widgets, XML, file I/O, Unicode character processing, distributed method calls, data structures, general algorithms, logging, regular expressions, compression, i18n, l10n, cryptography, image manipulation, and centralized directories.
Show me another language in common usage that has standardized interfaces for all of these things and also compiles to native code. Personally, I'm quite happy with Hotspot and/or JITs, but we were talking about native (ahead or time) compilation.
A question regarding reflections: have you tried using TowerJ and linking in the JIT only for the spots that need reflection?
- I don't need to go outside, my CRT tan'll do me just fine.
Sounds like Perl to me. It's a matter of taste. A lot of people can't bear Perl code, others prefer Perl style and hate Java. Personally, I think Java beats Perl a million times. Perl code just isn't readable, especially not cross-programmer. Sure, if you apply the 'shorter code equals easier maintenance' formula, Perl probably wins. But I think Perl makes a good case against this formula. You could probably write a whole web application as a Perl one-liner, but to debug it would be a full-blown research project of several months or years.
>What I can say conclusively is that a programmer of equal skill in C++ and Java can write the same program in less lines of Java code.
While I agree 100% with the overall message of your post (that context is relevant to which language is superior), I disagree with the specific sentiment above. If you have a class system you are using, then the C++ can be fewer lines. Comparing the Java libraries with the C++ stdlib isn't really a fair comparison, because there are a multitude of free and commercial APIs and classes that also "do a lot for free".
-pyrrho
I think he means that the *clients* aren't all in the same building, on the same LAN.
If they are "thin" clients, then you have a web-browser-like setup. So, do you mean "a bunch of fat clients all over the place"?
OK, you can do array bounds checking extremely easily in C++, and garbage collection with a bit more work.
Tell me, how do you turn them off in Java when you don't want them?
Most of the slowness is introduced from poor design, or overly complicated designs. It will only matter as much as C vs ASM by the time everyone has a 2Ghz processor. :) I don't think you were trying to say it's an obstacle, but rather you were trying to say it is a concern. I wouldn't make a language choice based on the slowness of swing or Java (because they aren't that slow). That doesn't mean that the job is done either. When Java is more popular, 3rd parties will be selling JVM's that out perform the free standard one by leeps and bounds. When there are a lot of applications built on Java, users will pay for a better VM... they paid for Memory doubler (which didn't do anything... really... it did nothing but display fake statistics).
The mobile/embedded devices are indeed going to be the next Java win. Desktop applications won't be far behind though. I would say Webstart will become a big thing soon for companies. Imagine never having to update software on the end machines! Well... except for the OS, but chances are, that changes less than your custom software. You don't even have to install the software on the new machine... the user accesses the application right off the corperate website, but it's a rich client!
Karma Clown
Please note that Java is a relatively new language and still in evolution. Generic coding (templates) are still discussed and will be introduced in the next version of Java.
Perl code just isn't readable, especially not cross-programmer.
How do you know, you are not a Perler. Some Perler's love reading other's cryptic code. The challenge keeps them awake, and they get better with time. Perhaps they would rather read bad Perl code that takes up 3 lines than bad Java code that takes up 3 pages.
A lot of small experimental languages target the JVM. That way they get all kinds bytecode tools for free.
One example I got to work with a few years ago is Nice. A nice (no pun intended) combination of functional programming and java.
Duh duh duh tchhhhh!
pushback may get you this, but one of the biggest sources of errors is an out-of-bounds array indexing. In such a case, the behavior of STL's indexing operator for vectors is not defined. Sure, in some decent implementation, you would get an assertion if you compiled with debug macros. But it gets you only so far.
My exception safety is -fno-exceptions.
How do you know, you are not a Perler. Some Perler's love reading other's cryptic code. The challenge keeps them awake, and they get better with time. Perhaps they would rather read bad Perl code that takes up 3 lines than bad Java code that takes up 3 pages.
True, as I said in another post, it's a matter of taste. Also, just because it's fun doesn't make it effective. The riddles on the last page of the newspapers are somteimes fun, too. Actually I sometimes enjoy doing a little hacking, too, like weird SQL constructs or regular expressions magic. But I still wouldn't want the whole project to be like that.
I think Java can't die that easily. Nearly all posts forget about a very big supporter of Java, IBM. IBM will never support Microsoft-propietary on its servers. (I mean, since IBM started eclipse, it's entire development platform is built and made for Java.
So with server suppliers Sun and IBM it's natural to use Java on the server. An when the backbone is Java, why not use the same environment (Java, JDBC-Drivers, XML-Access) on the client. (it's by far easier to maintain...)
But of course: It'd be great to spread JVM among the clients around the world, although JVM is a fairly "heavy" thing over the slow lines out there... (at least Sun's, which is the only "comfortable" under Windoze)
So the developing community should concentrate on making standard routines for installing the JVM by providing direct links on webpages and so on. (like this happened with Acrobat Reader which you can expect being installed on nearly every system connected to the internet)
If it's going to get bigger for phones, it's got to be faster
I'm not too sure what you mean by this. When I said 'bigger', I meant that it was a big player, with loads of market-share.
Incidentally, J2ME *is* getting bigger, with the next MIDP version (think of MIDP as a cut down Java API) coming out (at 2.0 now, although it won't make it onto a suitable number of handsets until late 2003). I personally think this is a good thing - the functionality currently available with MIDP1.x is pretty cut-down, and the phone specs are increasing at a downright scary rate, so any bloat (and I think it's all been designed very well, collaboratively with handset manufacturers, so bloat isn't realy an issue) will be offset by faster handsets!
---
"An eye for an eye leaves the whole world blind" - Gandhi
It might be worth remembering that gcj can compile JVM bytcode and Java source to native code for Linux, Solaris and Windows. I know it is far from complete for Swing etc., but it's getting there fast.
So Language --> JVM --> native app. is also possible.
Also:rmi
offers rpc plus the ability to dynamically load code over a netowrk and execute it locally. This is a major advantage over CORBA/SOAP implementations and goes with the platform-portability, you can do some very cool stuff like jini this way.
If it is on the Internet, then why does it have to be *geographically* distributed? Just make one big-bass server room running things like Oracle somewhere in Denver. That way you don't have to duplicate similar configurations and setups all around the country (or world). (With off-site backups, of course).
Smells like a conspiracy to sell duplicate Sun-boxen to me.
Two words: LEGACY SYSTEMS
From your statement, I think we can only conclude that you have no Real World work experience.
Java doesn't have templates (why do you need one when you have java.lang.object (void* for you you C++'ers)), but it does have a Containers object (interface) that mimics the entire stl library (and it comes standard with the Java SDK (java.util.*)). For example, an "ArrayList" is an implementation of the container that comes complete with iterators and methods. Best part? All containers are integrated together. So changing your ArrayList into a Hashmap is as simple as:
HashMap myHashMap = new HashMap( myArrayList );
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
Even perl has its bugs.. just like java. IO::Socket has some problems on some architectures.
-
ping -f 255.255.255.255 # if only
Tablizer asked: "If it is on the Internet, then why does it have to be *geographically* distributed?"
You misunderstood my meaning. The main servers can be all in one location, like for instance your RDBMS, web server, and middleware. But the SYSTEM is distributed, because it contains client-server components (like client software running at various locations) browsers being one form of client of course, and so on... See what I mean? It's distributed because the people accessing it are all over the place. And, sometimes, a local office will have its own servers for one purpose or another, and they'll have to work with the servers at another location... You have to be flexible in your thinking here.
Think about it this way: what if you were a credit card company? You wouldn't want to do things YOUR way, putting everything in one building. Because then, Fight Club will come blow it up and destroy the debt record. So, instead, you duplicate your servers (so you can continue processing requests) and your data (so you don't "miss" any debtors)in every major city in the U.S. where you have a presence. And, you synchronize this data nightly. Then, when Brad Pitt blows up your main office, you just continue with business as usual, and file your insurance claim.
See what I mean?
Farewell! It's been a fine buncha years!
Yeah, but there's a diff. Cobol is more a biz language, as java tries to be an end all anguage. Granted, it's not bad to have high goals. It just means that you'll try to evolve.
We've seen java 1.1, 1.2, 1.3, 1.4. Granted there will be a compatability shift between 1.2 and 1.4, but moving from 1.2 to 1.4 is little effort.
-
ping -f 255.255.255.255 # if only
Shit happens :) People make accidents. At least you don't pay for it with a buffer overflow.
-
ping -f 255.255.255.255 # if only
An A/C asked: "If they are "thin" clients, then you have a web-browser-like setup. So, do you mean "a bunch of fat clients all over the place"?"
Could be a mixture of both. There might be times you want a fat client. It depends on your application. But, you can have servers and clients in different locations -- legacy systems, locations and departments which want closer control over their data, weird political shit going on... You can get into some heavily weird, complex stuff.
Gotta be flexible.
Farewell! It's been a fine buncha years!
I don't want to sound like a troll, but at least in IE this problem doesn't arise. It's nice to use Open Source software and all, but with this many bugs still open, I'll stick to IE, it's fast, and most webpages are written for it, anyway.
Note to moderators: Sure, mod me down, everytime someone brings up that IE might be better than an OSS product, it MUST be troll!
<grub> Reading
I guess I should have been more specific. I was referring to Computer Language Academics. Computer Scientests mostly. Some of these guys aren't happy unless the language is completely impractical for any real world use though (ever try to program a Turing machine?) Much of the time the resentment comes from languages that don't include their pet theory, like complete orthogonality or instruction set minimization. The Bioinformatics people are probably using Perl to solve the simple problems they have so they can get back to work with the stuff that really interests them.
I read the internet for the articles.
Sure, you can use the indexing operator, which is defined to be insecure, or you can use at() for the same functionality w/o the operator overload but with bounds checking.
It is still, of course, nice to have error checking as a feature of the language rather than the libraries.
personal attacks hurt, especially when deserved
By the way, try using Java on a free BSD. FreeBSD is the only one of them (of the "core three", maybe it's better on Darwin) with a patchset to get a native Java, but they can't distribute it because of Suns license.
I used to believe this, until I had to use the Swing-based Solaris Management Console coming with Solaris 9. If Sun can't write performant Java GUIs, I guess people should start searching for a solution rather than for excuses.Programming can be fun again. Film at 11.
Even if you ignore the advantages of managed memory, you can't ignore the fact that new is a blocking, non-deterministic, operation. Good garbage collectors can operate on a different thread and (mostly) stay out of the path of execution. new() is nearly a no-op in garbage-collected environments. You would really have to do a lot of (error-prone) work in C++ to achieve this through libraries rather than the compiler itself, and it is still too easy to defeat with bad programming practice.
Also, you mention the lack of stack objects. Java does have stack primitives, and dynamically allocated counterparts to provide object services, which is a clunky combination. .NET improves on this with stack-allocated structs and "boxing" where a primitive remains stack allocated until the compiler/interpreter detects that an object service is needed (ToString(), etc), and it boxes the primitive up into an object and unboxes it when done. You don't pay the object penalty if you don't need object services. Good design can allow you to avoid paying much of a penalty for Java's lack of stack-allocated objects (singleton pattern with a Reset() method for reusable working class object, etc.) Unfortunately, some of the Java library's objects aren't well designed for reusing instead of reallocation, especially in the GUI, so you may find yourself doing allocations in the painting loop without some trickery.
That said, it sounds like your lab has sound development practices, which does tend to aleviate much of the need for the outstanding features of Java/.NET.
personal attacks hurt, especially when deserved
Well, that's not everything, but it is a pretty good list, I think.
personal attacks hurt, especially when deserved
Do you think that everyone in Sun can write good java code? What I stated in my post was not an excuse but rather a fact. My team is developing a very large Swing GUI and we are having very little "sluggishness" that everyone claims that Swing is plagued with. However, every time we find a slow spot it is invariably because of someone taking a short-cut in the code that caused the problem.
It is possible to write efficient and speedy GUIs in Swing. Just because it cannot be done with drag and drop does not mean it cannot be done.
seSales, Point of Sale software for OS X.
Two words: LEGACY SYSTEMS
So what you are saying is that you put Java on legacy systems in order to share information to and from them?
I do not hear this mentioned much in Sun's literature. Besides, you can use HTTP to link diverse systems without using Java's funky protocols. Easier too.
Table-ized A.I.
Think about it this way: what if you were a credit card company? You wouldn't want to do things YOUR way, putting everything in one building. Because then, Fight Club will come blow it up and destroy the debt record.
That is called "off-site backups". You don't need Java to do off-site backups. In fact, I think most commercial databases offer built-in tools for just such things (or at least extensions).
Table-ized A.I.
"Enterprise App" is an application serving a need such that when it fails, financial losses are incurred.
Financial loss is a wide continuum.
Table-ized A.I.
Heh, hehe, okay.
According to Bagley's site, we should all be using Ocaml anyway. Who knows, he may even be right...
In reference to the Bagley test, Java was more performant than Python, true. But Python won over Java on both memory and lines of code. Also, his tests, as all artificial benchmarks, are both accurate only for the point-in-time and are only accurate within the limits of the test conditions themselves. More recent versions of both Java and Python are faster. On top of that, special-purpose optimizations exist for both Java and Python if you really need that extra spurt of speed -- think Jikes or TowerJ for Java and Psyco for Python. More to the point, though, Java may be faster than Python, but it isn't faster by an order of magnitude. The difference in speed between them is not enough to worry about -- if you really need that much speed, you won't be programming in either Java *or* Python, you'll be coding in C and assembler. Your performance argument is irrelevant.
Your libraries argument is somewhat more compelling. However, you may not be aware that there are two major versions of Python, standard Python implemented in C and Jython, implemented in Java. Using Jython, you can write Python that has full access to all of Java's libraries.
On top of that, I'll make a very rough comparison between the various projects on Jakarta and extant Python libraries. I don't think I've seen anything like this, as Python has a poor record for collating their libraries and apps in one place, so the effort is worth it simply for educational purposes, if nothing else.
Disclaimer: I am not terribly familiar with most of these projects, and they have varying states of completeness and maturity. I merely aim to show that analogs of the various Jakarta projects do exist in the Python world. Please feel free to peruse them yourself and come to your own conclusions.
Jakarta Ant -- PyAnt , SCons
Alexandria -- I don't know of any comparable Python applications. However, the individual components of Alexandria (doc generation, CVS access, etc.) are available: check out HappyDoc , and various modules for use with the Zope application server, including CVSFile
Okay, now I'm going to lump together a bunch of Jakarta projects. Individual authors and users of these projects will inevitably scream, but my justification is that they are all web application servers of one sort or another. Their purposes are all the same. They have many differences in approach, philosophy, scope, and implementation, but at heart, they are all web application servers or web application server frameworks. Those projects are: Avalon, Jetspeed, Struts, Turbine, Velocity, Slide, and Tomcat itself. Oh, and I might as well throw James in here, too. Python web app servers and frameworks are equally numerous, and several are in advanced stages of maturity: again Zope, Twisted, Webware, Quixote, CherryPy, and SkunkWeb. There are more, but I'll leave that as an exercise for the reader. Google is your friend.
Lucene has no real counterpart in Python. David Mertz has put together a text indexer and search program, available at his site, but it looks small compared to Lucene. There is also something called WePaSe, but there is no information on it aside from its freshmeat release announcement.
Gump also has no counterpart. Cactus has an equivalent in WebUnit and PyUnit. Log4J's Python copy is called, naturally, Log4Py.
ORO and Regexp provide regular expressions for Java. Python has regular expressions built in to the standard library.
OJB provides an object-relational bridge for Java, similar in concept to Sun's JDO specification. Python counterparts are Modeling , PyDO, which is a subproject of the above-mentioned SkunkWeb, and MiddleKit, a subproject of WebWare.
ECS, JMeter, and POI have no Python counterparts. BSF also has no counterpart, since it embeds a scripting language in compiled Java. Perhaps its "counterpart" is Jython. Likewise, BCEL has no counterpart, nor does Watchdog.
Taglibs has no direct counterpart. Instead, Python has Spyce, Cheetah, PSP, and probably close to a dozen other implementations of the ASP/JSP theme, each with their own library of tags. Lack of a standard is perhaps not a good thing, but the existence of bunches of competing implementations is not a bad thing. Perhaps the most direct counterpart would be Zope's built-in technologies, DTML and ZPT. ZPT has also been built out into a standalone version, SimpleTAL.
Jakarta Commons has too many small projects for me to want to research Python equivalents. If you are looking for something in particular, check the Vaults of Parnassus first.
As for Apache XML, Python has SOAPy and ZSI implementing SOAP, and DOM, SAX, and XML-RPC are built in to the standard library. 4Suite implements DOM, SAX, RDF, XSLT, XInclude, XPointer, XLink and XPath, and has an XML and RDF data repository and server built on top, which would make it very roughly equivalent to both Cocoon and Xindice. I don't know of any Python equivalents for Batik, FOP or XMLSecurity.
Python has relational database access through its DBAPI standard, with adaptors for just about every database. There are a number of object databases coded specifically for (and often in) Python, the most well known being ZODB, which was developed by Zope. There are adaptors for other object databases as well.
There are really two spaces where Java outstrips Python, and the second space is IMHO directly caused by the first: standardization, and J2EE. Python puts out a language implementation and a lot of very useful libraries, but does not have any standardization body like the JCP. The result is lots of fragmentation. Individual developers write their own libraries and applications that compete with each other while offering wildly differing APIs and programming approaches. There has been some push to organize, through the official Python SIGs, but their efforts, while noble, have not been massively effective. Only this month has an initial implementation of a Python library repository similar to CPAN been released. Kudos to Andrew Kuchling, who made it happen, but it is LONG overdue.
Regarding J2EE, the only viable competitor is Zope. Even then, Zope really doesn't address the same problem space. The shortfall here comes from a number of different factors: corporate buy-in, public perception, lack of an established problem-space solution, and lack of published standards. Zope is a great solution, and has been used by a number of high-profile companies, but its focus is different.
Well, I hope you find this comparison to be useful. *I* certainly found it enlightening.
Tablizer said, "That is called "off-site backups". You don't need Java to do off-site backups. In fact, I think most commercial databases offer built-in tools for just such things (or at least extensions)"
Tablizer, This whole subthread between you and me is based on the fact that you don't seem to understand why a company or government would have servers in more than one location. Right? Which implies that you've never worked for a large organization and you're just being dense and stubborn. So let's consider some cases in which a company or companies might have large, distributed systems with some degree of redundancy.
Some organizations will want to incorporate their own systems with another set of systems, for instance during a corporate merger. This will mean that there are multiple locations, all of which have their own servers, and which must now interoperate. Ok? I guarantee that all of Hewlett-Packard's and Compaq's records do NOT lie in a single server room in a building somewhere, and they do NOT rely on "off-site backups" for protection (although I'm sure they have them).
Large, multinational corporations have multiple locations in multiple cities, and there is almost certainly a great deal of redundancy in their systems. This is because (unlike you) they have considered the possibility of fire, or some other hazard, taking their servers out of commission. Thus, they have some degree of duplication of capabilities, and they have systems in place which synchronize records among their databases. Getting the picture yet? Which brings us to another point, which is that organizations of any significant size will do part of their business in one location, and part in another. Consider a large manufacturer for example. An organization like this may have corporate offices in NYC, Chicago, and L.A. all of which have the ability to handle transactions for the other two in the event of some sort of disaster. Also, they might have manufacturing plants in Kuala Lumpur, Thailand, and Taiwan, plus affiliated plants which produce parts and supplies for them. Those plants will have their own systems, and the affiliates will have THEIR own systems, ad infinitum. All of these systems will have to interoperate with the home offices in the States, and there might be some redundancy here, too.
If you're getting the picture yet, you'll understand that we're talking about really HUGE systems here. We're talking about companies like Chase Manhattan Bank, or General Motors, not a little dot-com with ten employees, here. Organizations with not just thousands, but tens of thousands of employees, in multiple locations across multiple countries (let alone states).
Now, perhaps you'll understand why your comment that all we need is a server rack and a tape drive for "off-site backups" isn't just naiive, but really, agonizingly, stupid.
Enterprise systems usually are very, very large. Their scope is generally greater than one person can fully follow at one time. This was the whole point of object oriented programming in the first place, and it's one reason why people love enterprise javabeans. When people talk about scalability, this is what they're talking about.
One server and an offsite backup do NOT an enterprise system make, any more than a matchbox car can run in the Daytona 500.
Now please think about this a little before you come back.
Farewell! It's been a fine buncha years!
Y'know that could be a reason why the job market is bigger for Java programmers. You need the extra programmers just to keep up with those SuperLongRSIInducingNames :).
The sad thing is, I thought the real CS academics would be out pushing LISP or LISP like stuff rather than Java. Then again maybe they've already written the perfect Lisp program already and it's moved to the next plane of existence and created its own universe.
However, I don't argue that it is impossible to write good Swing apps. But most I have personally used were slow and needed lots of memory. I doubt that it's just my bad luck and I missed all the really good ones, so I think there is definitly room for improvement. I can't help but see a better Java UI library (that is more Java-like than SWT) as a win for both developers and users. Of course, if anyone could write non-sluggish Swing GUIs, your team would loose it's competetive advantage, so you might not agree ;-)
Programming can be fun again. Film at 11.
For simple-medium complexity programs (the common cases), shorter code can often mean easier maintenance, because in most cases it means the language is well suited to the problem.
1 8
When a language is well suited to a task, the important symbols in a program would consist of mainly standard symbols with fewer custom ones. And you won't need many symbols in the program.
Symbols = meaning, not programming symbols.
You could have a language with many standard words for different shades of green. People reasonably fluent in that language can understand fairly quickly which greens they are talking about.
They can then concentrate on the "real task" like: what to do with the green objects and so on.
Whereas in a less suitable language you'll have to document/describe your custom definitions of green first, and you can end up with lots of custom definitions. Light granny apple green, etc.
Very like a data compression problem, and algorithm suitability.
Why I like Perl is it (and CPAN) is well suited to the common cases I deal with.
Whereas with Java is I find you often have to create symbols of your own even for typical common cases, whilst they seem to have symbols for uncommon cases. It's not just my common and uncommon since it's in an FAQ:
http://java.sun.com/products/jdbc/faq.html#
There are many other examples of such strange pessimizations.
In the case of large complex programs, they can be so complex it doesn't matter anyway - it'll take very many custom symbols to describe no matter what. So it probably doesn't matter if you're writing it in Java, as long as you can keep things manageable. Apparently you can do this with Java. And many people claim you can't do this with Perl.
But one would think a language with good Design by Contract features would be better than either in this case.
Also too often large super complex software is just a result of bad design, not of technical necessity.
There are some products out there, written in Swing, where the GUI runs quite nicely. I will agree with you that they are few and far between. What annoys me is when people post on these boards that Swing itself is slow, etc. when the reality is that it is the developers.
I agree that there should be some magical way to show these developers how to write good Swing code but realistically that is not going to happen. So unless Sun et al is going to educate all of these wanna be GUI developers or rewrite Swing so that anyone with a point and click IDE can design a speedy gui, we are stuck in the middle.
seSales, Point of Sale software for OS X.
I dunno about you, but Yahoo etc scales pretty well. Uptimes and availability pretty good.
Linear scalability, failover etc is more about design than about programming language.
Why would it be so difficult to implement such a design in Perl/PHP? I don't understand why you say you can't share/store session data with Perl or PHP.
Besides, you can use HTTP to link diverse systems without using Java's funky protocols.
Ok why don't you be more specific and give us some examples.
And please try to make it in the form of
"I was working on a project where the java code failed/performed slowly/took too long to complete"
instead of your usual
"this procedural code block is prettier to look at than this ugly OOP code block."
Thanks in advance.
That is the entire point. You seem to agree. The JVM is not a language neutral architecture. In the end this will be why it will be surpassed by CLR or some other language framework.
You get to look in, but unless you pay the dough you have no input into the process. This is not open by any definition.
I'd forgotten about that. What a crummy design decision--why is using the dangerous operation more convenient than the safe one?
The sad thing is, I thought the real CS academics would be out pushing LISP or LISP like stuff rather than Java. Then again maybe they've already written the perfect Lisp program already and it's moved to the next plane of existence and created its own universe.
:-)
Give up promoting LISP. It is just too powerful for the masses. LISP is like jacking off: It feels great, but you can't do it in public
Table-ized A.I.
Ok? I guarantee that all of Hewlett-Packard's and Compaq's records do NOT lie in a single server room in a building somewhere, and they do NOT rely on "off-site backups" for protection (although I'm sure they have them).
In my observation, they usually pick one of the systems, and phase out the other.
Further, most live backups use database replication, because that is where must of the 'active' info is.
If you're getting the picture yet, you'll understand that we're talking about really HUGE systems here.
But Java is being heavily pushed for small and medium stuff also.
Besides, show me some interconnectivity that Java does better than say Perl or Python or LISP, etc.
Table-ized A.I.
I'm not using LISP myself.
:) ).
LISP seems well suited for the super smart industrious programmer who writes everything himself because everything else is written wrong anyway (seems a common thing in the Forth world as well). The sort who with just a few lines of code can morph an online shopping lisp app into a vertical market auction site.
Not me - me lazy and only reasonably smart (so I use Perl and CPAN
I figure the main symbols/meanings for LISP are for manipulating symbols/meanings (and lots of them).
Whereas the main symbols for other languages are for doing supposedly commonplace stuff.
Thus the resulting pros and cons.
Ok why don't you be more specific and give us some examples.
How about you post something that Java can allegedly do better than HTTP and CGI-like scripts.
Tablizer said: "But Java is being heavily pushed for small and medium stuff also. Besides, show me some interconnectivity that Java does better than say Perl or Python or LISP, etc."
Does Perl/Python/LISP support enterprise javabeans, and all the useful encapsulation of functionality they represent? Do they support database transactions (ACID)? Since they're scripting languages and not fully OO, how would an application server do object pooling with them? Or any of the other tweaks that are common in J2EE? One common thing is to put either an EJB or an MTS object between a web server and a database (or some other resource), and use a firewall to limit access based on this. How would you do that using a scripting language?
Farewell! It's been a fine buncha years!
I think you've missed my point; the parent was asked what made Java a suitable language for large applications. A big library of code is a dumb answer, because every man and his dog has that.
If he'd discussed design features of Java *as a language* that make it harder to write unmaintainable code, it would have been a useful comment.
As for bad perl - well, yes, there's a lot of it out there. Unfortunately, there's now a lot of crapulent Java. I'm currently looking at some commercial products which have been written by the sorts of idiots who can't use an RDBMS properly, so reimplement WHERE, ORDER, and GROUP in their Java code.
Does Perl/Python/LISP support enterprise javabeans
JavaBeans are Java-specific. Why not LISPbeans?
Do they support database transactions (ACID)?
No, but databases do.
Since they're scripting languages and not fully OO
Does that mean that Smalltalk is not OO?
how would an application server do object pooling with them?
You have not established a need for object pooling. Object pooling might be how java does X, but that does not necessarily mean it is the only way to do X.
One common thing is to put either an EJB or an MTS object between a web server and a database (or some other resource), and use a firewall to limit access based on this. How would you do that using a scripting language?
Use something else to communicate thru a fireall. Use XML thru HTTP, for example.
Table-ized A.I.
In comment:reply format, in response to Tablizer's statements:
Comment: "JavaBeans are Java-specific. Why not LISPbeans?"
Response: Fine. Show me some LISPbeans. If they do everything JavaBeans do, bully for you. I wouldn't personally use 'em -- I'm reminded of a quote, "Only effeminate programmers use more parenthesis than code". But, I guess this is a matter of taste. For the record, usually I use COM/DCOM/COM+. This is a non-java technology, btw.
Comment: "No, but databases do"
Response: You misunderstood completely. Yes, databases support transactions. However, using a transaction server you can handle transactions in code and handle errors much more gracefully. But I'm not going to teach you how to do that for the sake of this weird argument.
Comment: "Does that mean that Smalltalk is not OO?"
Response: No, it doesn't. But so few people are using it that I basically ignored it. Smalltalk, yikes. What do you drive, an Edsel?
Comment: "You have not established a need for object pooling."
Response: Because I thought you would understand the need. Object pooling is used to speed up response. A pool of objects is kept in memory so that new requests can be served without having to copy a new object into memory, initialize it and so on. It speeds things up. Does this clear the need up?
Comment: "Use something else to communicate thru a fireall. Use XML thru HTTP, for example."
Response: Again, you misunderstand. The IDEA is to have a nice little chunk of executable code which encapsulates an entire piece of your functionality, and which in theory has already been thoroughly debugged. You're connecting to a binary object which performs some task for you. You can simulate this with a script, but it still won't be quite as good (fast, secure, etc). And, you're going through your transaction server's interface, letting it handle transactions and object pooling, and so on. Another issue is, once you've solved something with object A, you can reuse object A in other projects without copying it or moving it anywhere. There's a lot of flexibility in this approach.
Now, this is getting a little silly. Either you don't understand the issues at all or you're trolling (I've suspected this is the case for a while now, but I've given you the benefit of the doubt). Maybe we should just "agree to disagree" and let the whole thing drop.
Farewell! It's been a fine buncha years!
The guiding principle of Perl language design is to borrow whatever works from other languages. Rather than a regimented and legislated design like Java or Eiffel, Perl revels in its own freedom. It is ecclectic, and it does lack orthogonality in more than a few respects, but it has supported full object-oriented programming since version 5. Perl 6 will be much more amenable to academic types as a fresh rewrite of the language according to more standard "principles".
Finally, even Java Junkies runs on the Perl/DBI/MySQL Everything Engine.
Show me some LISPbeans. If they do everything JavaBeans do, bully for you. I wouldn't personally use 'em -- I'm reminded of a quote, "Only effeminate programmers use more parenthesis than code".
LISP is far more flexible a language than Java. You can bend it to be just about any paradigm. You can write your own control constructs (like IF statements, loops, etc.) But, I don't want to get into Yet Another Language War.
But so few people are using it that I basically ignored it. Smalltalk, yikes. What do you drive, an Edsel?
You seem to be thinking that New == Good. I will leave it to Smalltalk fans to defend.
The IDEA is to have a nice little chunk of executable code which encapsulates an entire piece of your functionality, and which in theory has already been thoroughly debugged.
Functions that act on databases can do the same thing, and my interface does not have to replicate many of the "collection" operations like add, delete, find, sort, save, etc. because it processes a referenced collection (DB) instead of having to manage it from cradle to grave like "pure" encapsulation dictates. But, this is Yet Another Paradigm Battle that cannot be solved in a few paragraphs.
You can simulate this with a script, but it still won't be quite as good (fast, secure, etc).
Fast? Java is rarely praised for its speed. The best it can do is "good enough". (Not that I dwell on speed like some clock-watchers, but you brought it up.) Secure? Well this mostly depends on the API's and libraries IMO, not the language.
Anyhow, there are many ways to slice a cat. Sun's Java is only one vision.
Table-ized A.I.
Enough. Obviously nothing I tell you will have any effect. Continue to use your quaint, antiquated tools if you wish. I am not evangelical; I couldn't care less. But this is going to go on forever, and I have work to do.
Let's agree to disagree.
Farewell! It's been a fine buncha years!
Whereas with Java is I find you often have to create symbols of your own even for typical common cases, whilst they seem to have symbols for uncommon cases. It's not just my common and uncommon since it's in an FAQ:
http://java.sun.com/products/jdbc/faq.html#18
I can understand why there is no getRowCount Function, though. It really is a massive performance issue. Or am I mistaken that to get the count of a normal result set, you need to read all the rows? Meaning that would be an issue of the databases and SQL, not of Java. So Java doesn't decide for you if you'd rather step to the last row or make another query with SELECT count(*) to determine the number of results. It might depend on the database used or the specific query which version works faster?