Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java Programming

The Future of Java? 624

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).
This discussion has been archived. No new comments can be posted.

The Future of Java?

Comments Filter:
  • by The Wookie ( 31006 ) on Thursday January 23, 2003 @12:01PM (#5143340)
    can be found here [tu-berlin.de].

    It doesn't mention SmartEiffel, though, which does generate byte codes. There are probably many others as well.
  • a lot (Score:1, Informative)

    by Anonymous Coward on Thursday January 23, 2003 @12:02PM (#5143344)

    see http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.ht ml
  • Jython (Score:5, Informative)

    by russianspy ( 523929 ) on Thursday January 23, 2003 @12:03PM (#5143358)
    www.jython.org [jython.org]

    Allows to write programs in python and compile into java bytecode. Access to awt for sure. I think there is also a port where you can write Tkinter applications in jython as well.
  • Microsoft Appeal (Score:3, Informative)

    by the_Bionic_lemming ( 446569 ) on Thursday January 23, 2003 @12:05PM (#5143371)
    It's been . [msnbc.com]
  • by Anonymous Coward on Thursday January 23, 2003 @12:05PM (#5143373)
    http://www.appletmagic.com/
  • Google Search (Score:5, Informative)

    by jaaron ( 551839 ) on Thursday January 23, 2003 @12:05PM (#5143377) Homepage
    Well now that I can finally post...

    Here's [tu-berlin.de] a nice list of languages that work within the Java VM. I'd like to point out that its a very long list.

    Also, Java on the desktop has always had issues. Everytime someone brings up the "future" of java, they tend to forget that Java's current strength is on the server side where the average user doesn't see it and doesn't know about it. Java's competition is .Net, PHP, and Python (Zope) on the server.
  • by utahjazz ( 177190 ) on Thursday January 23, 2003 @12:06PM (#5143382)
    The Salon article has a link to a Language popularity study [tiobe.com], which points out Java is the most popular, but C# is the fastest growing.

    I find it more fascinating that Perl is growing faster than PHP. I dig Perl, but I keep thinking I need to get on this PHP bandwagon. Apparently, it's not much of a bandwagon.
  • Tons (Score:3, Informative)

    by Tony.Tang ( 164961 ) <slashdot&sleek,hn,org> on Thursday January 23, 2003 @12:07PM (#5143391) Homepage Journal
    There exist a whole pile of compilers for different languages that compile down to java bytecode.

    This page [tu-berlin.de] links to a whole whack of projects.

    To give a smattering: Forth, Ruby, Cobol, Eiffel, Prolog, Basic, Lisp, Tcl.

  • by gidds ( 56397 ) <[ku.em.sddig] [ta] [todhsals]> on Thursday January 23, 2003 @12:07PM (#5143393) Homepage
    Anyone know of any projects to compile JVM bytecode from other languages?

    This page [tu-berlin.de] lists over 150...

  • Apple Cocoa (Score:5, Informative)

    by MouseR ( 3264 ) on Thursday January 23, 2003 @12:07PM (#5143399) Homepage
    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.
  • Jython (Score:5, Informative)

    by dbarry ( 458863 ) on Thursday January 23, 2003 @12:07PM (#5143405)
    Anyone know of any projects to compile JVM bytecode from other languages?

    Jython [jython.org]
    # 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.
  • by dpbsmith ( 263124 ) on Thursday January 23, 2003 @12:12PM (#5143449) Homepage
    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.

    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... ...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.

    And I still experience a feeling of dread whenever I go to a web page and see "Applet loading..."
  • by znaps ( 470170 ) on Thursday January 23, 2003 @12:15PM (#5143486)
    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...
  • by jgerman ( 106518 ) on Thursday January 23, 2003 @12:17PM (#5143490)
    Who? Real coders who realize that the best solution is to use the right tool for the job. It creates no HR or logistical issues, much less major ones.
  • by Anonymous Coward on Thursday January 23, 2003 @12:18PM (#5143500)
    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.
  • 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.
  • Re:Ada (Score:1, Informative)

    by Anonymous Coward on Thursday January 23, 2003 @12:23PM (#5143545)
    A little more rescent link on JGNAT...

    ftp://cs.nyu.edu/pub/gnat/jgnat
  • Not really feasable (Score:3, Informative)

    by Temporal ( 96070 ) on Thursday January 23, 2003 @12:23PM (#5143551) Journal
    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).

    Microsoft's CLR (common language runtime; part of .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.

    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?
  • AspectJ (Score:3, Informative)

    by twisty ( 179219 ) on Thursday January 23, 2003 @12:24PM (#5143563) Homepage Journal
    The newest progression after object oriented programming seems to be Aspect Oriented programming. At the world famous Palo Alto Research Center, AspectJ was developed to compile AOP software into Java Bytecode. http://www.aspectj.org/ [aspectj.org]

    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.

  • by borkbork ( 30290 ) on Thursday January 23, 2003 @12:44PM (#5143711)
    The page you list shows a hundred or so that run on the JVM. A similar page [editthispage.com] for .NET shows only 27.

    Not what the marketing folks at Microsoft would have you believe, huh?
  • Re:Ada (Score:2, Informative)

    by peter_hagemeyer ( 553589 ) on Thursday January 23, 2003 @12:47PM (#5143737)
    I use ADA everyday! Most of it, err syntax and such, is part of PL/SQL.
  • by CorwinOfAmber ( 39299 ) on Thursday January 23, 2003 @12:54PM (#5143785) Homepage
    So where are the processors that Sun promissed that would run Java bytecode natively?

    There was a lot of talk about this in the various Java newsgroups in the mid-to-late '90s (here [google.com] is a typical thread on the subject). From what I remember, Sun originally thought that specialized Java processors, or even coprocessors on a daughterboard, might be a good idea. But, because the Java VM is a stack-based machine, implementing it in silicon turned out to be harder than expected, for less benefit than was hoped. I think they ultimately decided that it would be more cost effective to improve the JIT than to develop a Java CPU.

    I don't have any hard data or links to back any of this up, it's just what I remember.

  • by ep385 ( 119521 ) on Thursday January 23, 2003 @12:56PM (#5143793)

    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 [franz.com]

  • by Anonymous Coward on Thursday January 23, 2003 @01:01PM (#5143826)
    Wait, so if gcc is under the GPL, that means everything I compile with it becomes GPL?

    You have a wrong view of the GPL.
    (Assuming all of Java is GPL) If I modify the core java APIs and write a product with it, I can SELL the product, but I'd have to supply everyone with the source to my modified java apis (not the source for the product).
  • by lgraba ( 34653 ) on Thursday January 23, 2003 @01:04PM (#5143858)
    Here are a few of the more notable Java Processors ones:

    www.ajile.com (and www.systronix.com has a few boards built witht the processors).

    www.ptsc.com

    Also, the Jazelle technology from ARM embeds a java processor section into an ARM chip:

    http://www.arm.com/armtech/jazelle?OpenDocument

  • by jc42 ( 318812 ) on Thursday January 23, 2003 @01:12PM (#5143928) Homepage Journal
    ... ava were placed under the GPL, ...virtually every Java program distributed would have to be released under the GPL as well.

    Oh, FUD and nonsense. Perl is GPL, and nobody has even hinted that this means that perl programs must be GPL'd. Tcl and TK and GPL, and the same applies. If you bother to read the GPL, you'll find language that explicitly covers things like libraries (which is what the JVM amounts to), and it is made clear that GPL licensing for libraries doesn't extent to things that use the libraries.

    Methinks people are falling for Microsoft's anti-GPL propaganda.

    Actually, this isn't a frivolous worry. I worked on projects at several companies, including Digital, where the lawyers advised strongly against basing any products on Sys/V or any ATT libraries. They thought that ATT's licensing did imply that if you linked to ATT's libc.a, then ATT could claim to own your software. The story seemed to be that the lawyers thought this could be challenged in court, and you'd probably win, but if ATT wanted to press the issue, it could cost you a decade and a billion dollars to get the case decided. Better to go with BSD or OSF or roll your own (or now use linux), and be safe.

    This was widely believed at Digital to be the primary reason they went with other kinds of unix. It was much of the reason that the BSD gang decided to eliminate ATT code from their system. It was also a serious concern among the GNU people, which is why they explicitly address the issue in the GPL.

  • Re:A duck (Score:3, Informative)

    by AMK ( 3114 ) on Thursday January 23, 2003 @01:16PM (#5143964) Homepage
    However Microsoft have got pretty much every other language - Basic, Python, Eifel, Cobol, Perl, Scheme etc. to run.
    Um, that's not true. The Python .NET work [python.net] was an experimental effort that was incomplete, impractically slow, was never used for production work by anyone, and is no longer being developed or maintained. Perl.NET takes the existing C Perl interpreter and interfaces it so you can write .NET components, but Perl isn't being translated to CIL. The only Scheme compiler I can find [weblogs.com] implements a subset that doesn't support continuations.

    I don't know why no one has called Miguel on his claim that you have to translate everything to Java, but .NET provides a happy shiny world where all of the languages are well-supported. Clearly that's untrue.

  • by Richard_Davies ( 250599 ) on Thursday January 23, 2003 @01:17PM (#5143970)
    The chips aren't being made by Sun, but by ARM who provide jazelle [arm.com]. ARM is a much bigger player in the embedded market anyway. Also, look at how many mobile phones already do and will support Java and you will see why Java on silicon is alive and well.
  • by JohnFluxx ( 413620 ) on Thursday January 23, 2003 @01:17PM (#5143975)
    Many programs have lots of different languages.
    There was a game written in perl and C - perl for most of the game for garbage collection, bounds checking, etc. and C for the low level graphics to make it fast.

    Many more programs mix a really low level, low level and high level language. Games mix asm, C/C++, and lisp/prolog/made-up language. Intranets often have a mix of a javascript, java, C and some high level pure functional language (that would be like SML or Haskell) (Like lotus domino has - forget what it's called.)

    Being able to mix languages is a wonderful thing. :)
  • by Anonymous Coward on Thursday January 23, 2003 @01:19PM (#5143987)
    Ada has a bytecode generator. See here [adahome.com]

    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 !

  • by JordanH ( 75307 ) on Thursday January 23, 2003 @01:26PM (#5144039) Homepage Journal
    • Notice that GCC is not GPL, since it being GPL would cause everything to become GPL as well.

    Huh? I think you'll find that GCC is most certainly licensed exclusively under the GPL. [gnu.org]

    I think you need some education on what the GPL requires. The GNU FAQ explicitly covers the question of whether programs compiled with GCC are GPL'd [gnu.org] (they are not).

  • by p3d0 ( 42270 ) on Thursday January 23, 2003 @01:54PM (#5144258)
    You're joking, right? There are tons of static and dynamic compilers from Java or bytecode to native code. There's IBM's HPCJ [ibm.com] and gcj [gnu.org] just to name two static compilers, plus (of course) the hundreds of JIT compilers out there.

  • Re:Java hype (Score:2, Informative)

    by lux55 ( 532736 ) on Thursday January 23, 2003 @01:54PM (#5144266) Homepage Journal
    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.
  • Re: Ada (Score:3, Informative)

    by Black Parrot ( 19622 ) on Thursday January 23, 2003 @02:00PM (#5144311)


    > I thought about learning Ada for a while. I did the usual net research, but discovered that data types like integer didn't have standardized sizes. So, I didn't bother learning Ada.

    That's an odd reason. Did your research tell you that it will give you a default size, but you can coerce any size you want if you have special requirements?

    The whole point of the numeric representation business is to allow you to specify your programs so that they will run correctly on any hardware you port them to. But if you don't need that kind of power, you just take the default.

  • by Radical Rad ( 138892 ) on Thursday January 23, 2003 @02:07PM (#5144386) Homepage
    A company called Halcyon Software used to be developing a VB to java byte code compiler called VBix. I had a beta of it at one time and it worked under Linux with a few quirks in the GUI but only with a certain version of jdk, Blackdown 1.1.6 if I remember correctly.

    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 [stryon.com] if anyone wants to check it out.

  • Re:Java hype (Score:2, Informative)

    by Evil Grinn ( 223934 ) on Thursday January 23, 2003 @02:14PM (#5144473)

    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.

  • Re:Universities (Score:2, Informative)

    by FrozedSolid ( 201777 ) on Thursday January 23, 2003 @02:16PM (#5144491)
    I live in the US, and in my high school, I'm currently taking a C++ Computer Science course. It counts as college credit, and I'd go on to say how it's really a joke of a course, about unimportant design principles, but that's besides the point...

    Next Year, they're switching the course to java, Apparently all of the AP Computer Science courses are required to do it next year by order of the college board.

    I couldn't tell you if it means anything about future java dominance, but it's probably an interesting tidbit nonetheless

  • by jfengel ( 409917 ) on Thursday January 23, 2003 @02:26PM (#5144577) Homepage Journal
    <plug> I wrote a book on the subject of translating other languages into JVM bytecodes. It's called Programming for the Java Virtual Machine, from Addison-Wesley, and you can pick it up at Amazon [amazon.com]

    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 [ontologyworks.com] 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.

  • by Per Bothner ( 19354 ) <per@bothner.com> on Thursday January 23, 2003 @03:09PM (#5144932) Homepage
    I have been working on Kawa [gnu.org] since 1996. Originally it just compiled Scheme to bytecodes, but it is now a multi-language framework supporting XQuery, Emacs Lisp [sourceforge.net], 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 [gnu.org], a very interesting and useful new language from the W3C [w3c.org].
  • JVM limitations (Score:2, Informative)

    by certsoft ( 442059 ) on Thursday January 23, 2003 @03:30PM (#5145105) Homepage
    One of the problems implementing other languages efficiently using the JVM involves support for smaller than 32 bit integers, as well as unsigned numbers.

    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.

  • Re:AspectJ (Score:3, Informative)

    by Ivan the Terrible ( 115742 ) <`vladimir' `at' `acm.org'> on Thursday January 23, 2003 @04:20PM (#5145480) Homepage
    A better URL for all aspects ;-) of Aspect-Oriented Programming is this [aosd.net].

    BTW, when compiling standard Java, the AspectJ compiler produces the same bytecodes that are produced by a standard Java compiler because the same compiler is used.

    The first incarnation of the compiler produced Java code that was then compiled by a standard Java compiler. The second produced bytecode directly, and the current version -- I believe -- uses a modified Eclipse compiler.

  • Re:Java hype (Score:4, Informative)

    by quasi_steller ( 539538 ) <Benjamin.Cutler@gmai l . com> on Thursday January 23, 2003 @04:57PM (#5145813)
    The Wookie writes:
    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).

    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.

  • by Milo77 ( 534025 ) on Thursday January 23, 2003 @05:09PM (#5145942)
    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.
  • by Stu Charlton ( 1311 ) on Thursday January 23, 2003 @05:58PM (#5146362) Homepage
    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.
  • by Corvus9 ( 300802 ) on Thursday January 23, 2003 @06:43PM (#5146651)
    ... can be found
    here [tu-berlin.de]
    Many posters mention this page. In fact, I have spoken with other Java advocates who mention this page as proof the JVM is language-neutral. However, they do not mention that most of the "languages" on this page are Java interpreters or code generators, and nearly all the remainder are vapourware or proposals, not actual shipping products.

    Rogers Sessions took the time to investigate every single one of the projects on the JVM languages page. He posted his results to the ObjectWatch [objectwatch.com] site. After long research, he found only 8 that were actual implementations of a non-Java programming language for the JVM. Of those 8, in his opinion not one was available or suitable for professional development.

    In his conclusion he states "I believe that Simon Phipps and other Sun luminaries have greatly exaggerated the degree of language neutrality supported by the Java platform".

  • Re:Yes they did... (Score:2, Informative)

    by bwt ( 68845 ) on Thursday January 23, 2003 @11:44PM (#5148447)
    It takes twice as much code to get the same thing done as it does in Python, and the result is slower to boot.

    I disagree on both points.

    If you are writing enterprise applications then with java you have a **substantially** larger set of class libraries to start from, so the amount of code that you personally have to write is a lot less, so I disagree on your first point. Go take a look around the Apache Jakarta project some time. If you can show me python equivalents for a quarter of the projects there, I would be surprised.

    On the second point (speed) I can say that according to Bagley's computer shootout, you are objectively wrong. Java uses substantially less CPU than Python to do 25 standard computing tasks. Of the languages Bagley tested, Java placed 9th and python was 13th, although Java scored closer to first place C than it did to Python.

    Java's reputation as a "slow" language seems to be based on hot air. Swing is perhaps somewhat slow, but if you really want to write blazing fast GUI's you can always use the Eclipse SWT.
  • Re: Ada (Score:2, Informative)

    by James Lanfear ( 34124 ) on Friday January 24, 2003 @12:04AM (#5148541)
    I did the usual net research, but discovered that data types like integer didn't have standardized sizes. [...] and C is for everything else.

    C is far worse about unspecified integer ranges than Ada.

What is research but a blind date with knowledge? -- Will Harvey

Working...