Slashdot Mirror


Internet C++: Competition For Java And C Sharp?

Justin Goldberg writes: "I saw this article over on Linuxtoday about Internet C++, a new language that will bring standard languages and APIs, as well as current applications, to the Internet. Doom has already been ported to Internet C++, as well as X Galaga and Tetris. IDoom (the name of the Doom port) runs pretty jumpy on my machine running X on FreeBSD, but the release is in alpha stage." The reader forums on the site are pretty interesting, too, in discussing whether this is a truly (Free / Open Source) language, and about the extant alternatives.

273 comments

  1. Re:It's all about the portable libraries by bockman · · Score: 1
    ASAIK, there is an on-going project to add Java front-end (native and byte-code) to the suit og GNU compilers.

    I hope they succeed. Java-the-language managed to clear most of the worst nasty things of C++ without taking away much power.

    I share the idea that the JVM is the worst part of Java - for people not developing applets but full-blown applications, there should be the option of blowing it away and going native. In the meanwhile, I hope the JVM of 1.3 is improved.

    Java libraries are OK, but too involuted sometimes ( and something basic like lists and such should become part of standard language, as in python/perl). MMI API is nice, but awt looks awful and Swing is veeery slow. Anyway, I don't like languages too much bound to one set of API - I like the choice C/perl/python gives you in terms of libraries.

    --
    Ciao

    ----

    FB

  2. VM is not Open Source and isn't planned to be by Bruce+Perens · · Score: 2
    The VM is what I'd call "disclosed source-code", but isn't Open Source. They are proposing to eventually put a Motif-style license on it (which fails the Open Source definition because it discriminates about the type of system and the other software on the system). The current license is very far from Open Source because it doesn't allow modification of the way the VM works.

    There are technical problems as well, but I'll leave those to others.

    Bruce

    1. Re:VM is not Open Source and isn't planned to be by Gothmolly · · Score: 1

      Fork Fork Fork! If they've handed out source, take it and run with it!

      --
      I want to delete my account but Slashdot doesn't allow it.
  3. Re:Initial observations on the VM design by rhysweatherley · · Score: 2
    I'm pretty sure you're being sarcastic ... but whatever.

    Autogenerating code ... anything that transforms one language into another (e.g. Eiffel to C, TeX to PostScript, etc). Since they have so many instructions (16-bit opcodes), it is conceivable that they started with a pseudo-language that describes the operations to be performed in groups, and then generates C code from the output.

    e.g. There are likely to be large numbers of "move reg to reg" type instructions. Instead of coding every one, build a macro-like language that describes how one works, and then write a translator to convert to C. Sure, C's pre-processor can do most of that, but sometimes the transformation is algorithmic rather than straight text substitution.

    40,000 lines. Yes Mr Wizard, it is possible to build something as heavy duty as a VM in 40,000 lines. IF YOU PICK THE RIGHT DESIGN. In fact, I've been working on VM's myself for quite some time, so I absolutely do know what I'm talking about when it comes to VM design.

    Did you ever wonder where the bytecode verifier and the GC came from in Java? Really came from. Not just what Sun says. It's due to a bug in their instruction set. You can push an integer on the stack and pop it as a pointer - instant security issue. So the verifier and GC are necessary to prevent that from being a problem.

    But, here's the kicker: what if you could design an instruction set that didn't have that bug? No verifier. No GC. No type checking. No complicated reflection guff. No single-language dependencies. But still 100% secure, and less than 40,000 lines!!

    Sun made a mistake, which Microsoft copied blindly. But they didn't realize it was a mistake until it was too late to fix it, so they made up various marketing reasons for why "C++ can't possibly be secure because we were too dumb to figure it out".

    The Internet C++ VM is what I normally describe as "Bob's First VM" or "Graduate Student VM" - obvious opportunities for optimization being missed (switch vs dispatch functions), and code that is pretty much impossible to read.

    Have a nice day, and pick on someone clueless next time, instead of someone who's actually built a VM from the ground up.

  4. A new approach? by boessu · · Score: 2

    I think Internet C++ is as useful as GCC is, with the difference, that the compiled code is NOT native. So what's the advantage then?

    You have to write with "Multiplatform C++ style" anyway if you're using Internet C++. Nobody will be able to make the MFC available on Unix, except Wine maybe. But that's at the end the native way too.

    So I think Internet C++ fails the point (nice try...).

    There are many people here who states that Java (and C#) is actually a bad thing and Internet C++ was what they've been waiting for.
    I'll promise you: you're skills will have no advantages in this as it has no real advantage in any C Interpretors. It is not possible to do all "dirty" and "not so dirty" things possible in C++ on all machines. Alpha, PowerPC and Intel architecture are so different in so many ways, it's not possible to hold all the good things in C++ up while to not care about the platforms you'll support at the end. So it will be not possible to keep this in Internet C++ in that way you would like to have. There is also no way for Assembler, expect you'll allow this (which would be a break in multiplatform). As we all know, systems like Linux have allways an ASM-part, which is completely machine dependent.

    I'm a full time C++ programmer here and I like Java, because it tries to make the core idea of C++ and OO easy available for everyone (as most would say: Visual Basic programmers...). I can't imagine a better language for a beginner in programming. Also for prototyping, Java is for me really a cool thing to test architectural ideas.
    I don't like C# because it tries to make a new proprietary language mixing up with C++, Pascal and Java, instead of just enhancing C++ with garbage collection and such good things, but still back-compatible with my C++ and C sources (as Stroustroup would do).
    I'm sure the most C++ programmers will agree in this.

    Cheers

    Bössu

    1. Re:A new approach? by alacrityfitzhugh · · Score: 1

      I have been coding in C and C++ since 1984. I make my living doing this. This internet C++ is stupid. All you have to do is give up all the performance benefits of writing in C++ in order to run your code through an interpreter. Stupid. They think it is revolutionary to have the C++ compiled by the user on whatever OS they run. You have ALWAYS been able to do this. The problem is in writing the 'multiplatform' platform code properly. Internet C++ doesn't seem to have any help there. This is just stupid.

      Anyway, C# and the CLR are ALREADY IN THE PUBLIC DOMAIN just like C++! Duh! Ever hear of ECMA? Unlike the highly propietary Java which is controlled by mandate by a single company.

    2. Re:A new approach? by Anonymous Coward · · Score: 1

      Anyway, C# and the CLR are ALREADY IN THE PUBLIC DOMAIN

      N O T H E Y A R E N O T

      check your facts you little troll you

      besides, its all about the libraries anyway. Having C# POSSIBLY handled by the ECMA sometime in the future benefits no one since the NET libraries such as ASP+, ADO+, COM+ will remain proprietary.

      It's all about the libraries, stupid.

  5. Re:good in a way, bad in a way by scode · · Score: 1

    Smalltalk!

    I'm a huge Java fan, but I've always felt Smalltalks 100 % OO-ness and it syntax is a good
    thing.

    --
    / Peter Schuller
    --
    peter.schuller@infidyne.com
    http://www.scode.org
  6. Re:kewlest??? by Sir+Runcible+Spoon · · Score: 1

    I woundn't get ratty about spelling when you use 'there' in place of 'their'.

  7. Re:Initial observations on the VM design by Squirtle · · Score: 1

    > It looks like some of it may have been auto-generated

    Precisely. The full source does not appear to be available.

    > Tip for VM writers: use a switch statement!

    Nah. That's the slow way. Use gcc's calculated gotos. See http://www.uow.edu.au/~andrewm/cs++.html for an example.

  8. Re:Initial observations on the VM design by rhysweatherley · · Score: 1

    Hmmm - on second thoughts - maybe you weren't being sarcastic. Apologies if so. Need more caffeine to jump-start the brain.

  9. Re:I'm confused. by tijnbraun · · Score: 1

    thought of EVERYTHING being passed by reference Primitive types are passed by value.

  10. Re:Initial observations on the VM design by rueba · · Score: 2

    I don't think the guy was being sarcastic. He sounded pretty sincere to me. But I can't be sure...

    --
    The only reason all cover-ups appear to fail is that you never hear about the ones that succeed.
  11. About Java Speed by Anonymous Coward · · Score: 1
    Hi,

    I never thought that I would say this, but the speed of Java is nowadays just fine. Especially IBM JDK 1.3 for Linux is _really_ fast. I know that this is not a meaningful benchmark, but here is one thing I tried:

    class Test {
    public static void main(String[] args) {
    long t=System.currentTimeMillis();
    int j=0;
    for(int i=0;i100000000;i++)
    j+=i;
    t=System.currentTimeMillis()-t;
    System.out.println(t+" "+j);
    }
    }

    Runs in 610ms on my AMD K6-2 350 with 196MB with the IBM JRE 1.3 for Linux.
    #include
    void main() {
    long int t=clock();
    for(int i=0;i100000000;i++)
    j+=i;
    t=clock()-t;
    printf("%d %d\n",(int)t,j);
    }

    This runs in 601ms when compiled with gcc -O2 on the same machine.

    So the performance for calculation stuff is just as good as C++. Even the instanceof operator is really fast. But there definitely are some performance problems with Java.

    There needs to be some way to have by-value classes to efficiently implement things like complex numbers and vectors.

    The swing GUI is painfully slow. People just do not accept a GUI where they can actually see things being drawn on top of each other.

    So instead of inventing new VM Languages, somebody should fix the (few) problems with java. Unfortunately, only Sun is in a position to do so.

    Just my 0.02 Euro, Mr.Wrong

  12. Re:It appears .Net is proprietary "global bytecode by bmajik · · Score: 2

    It's not vapour. It exists, it runs, and people are developing for it, today.

    Furthermore, C# has been (or will be) submitted to ECMA.

    Finally, C# doesn't have its own runtime. It uses the .NET runtime, just like the other .NET products.

    --
    My opinions are my own, and do not necessarily represent those of my employer.
  13. Problem is, JVM is optimised for Java by Roy+Ward · · Score: 5

    Yes, you can technically compile any language to Java bytecode, but there are a few problems to deal with:

    * a fixed set of types. For instance, Java doesn't use unsigned numbers, so Java bytecode has no support for them.
    * no tail recursion - this is a biggie. If I have a function that the last thing to do is to call another function, then if I compile it to machine code, I can arrange to remove the stack frame before making the second call, so that if a the call path is f() -> g() -> f() -> g() ..., then the stack doesn't blow up. This is really really important for some functional languages.
    * Java bytecode assumes that the Java model object orientation is used. This is bad for languages that do things in a different way (such as Eiffel with multiple inheritance), or the many functional/logic languages that aren't object oriented.

    These can all be worked around, but at a great cost in efficiency.

    What is needed is a bytecode that is designed to be source language independent - able to handle the constructs for any source language without making assumptions about it, and be compiled relatively efficiently into any machine language. Java bytecode is not this language.

    1. Re:Problem is, JVM is optimised for Java by Sir+Runcible+Spoon · · Score: 2

      True. It probably isn't going to handle destructors very well either. People writing C++ code tend to reply on them getting called immediately to clear down resources etc..

    2. Re:Problem is, JVM is optimised for Java by Anonymous Coward · · Score: 2

      Actually it is the other way around. The Java Virtual Machine does not insist on single inheritance (just the Java Language does) whereas the Microsoft .NET/CLR does indeed insist on single inheritance.

      This is why Eiffel with multiple inheritance can be compiled to Java byte codes (yes, it has been done) but Eiffel with multiple inheritance could not be compiled to CLR bytecode (hence we have Eiffel#).

    3. Re:Problem is, JVM is optimised for Java by WeiszNet · · Score: 1

      This is new to me. Can you back your point with a URL or some reasoning. AFAIK the JVM does not allow MI just like the CLR. The reason behind that is that dynamic class loading and MI are very hard to combine (results in a efficency loss).

      Of course I may miss something here - and I would be glad to hear otherwise...

    4. Re:Problem is, JVM is optimised for Java by maraist · · Score: 2

      * no tail recursion - this is a biggie. If I have a function that the last thing to do is to call another function, then if I compile it to machine code, I can arrange to remove the stack frame before making the second call, so that if a the call path is f() -> g() -> f() -> g() ..., then the stack doesn't blow up. This is really really important for some functional languages.


      Hehe.. Perl Plug.. Perl has a special varient of "goto", which does just this. :)


      * Java bytecode assumes that the Java model object orientation is used. This is bad for languages that do things in a different way (such as Eiffel with multiple inheritance), or the many functional/logic languages that aren't object oriented.


      I think what you're talking about are optimizations. I think you are assuming that the meta-byte-code would be Java-family-centric. IF this crazy scheme could work (and I don't think it could, but for other reasons), then you could perform translations at compile time. We obviously know that we can write OOP on top of FOP (that's how C++ originally came about, and it's how GTK+ works). But it's just as easy to write FOP on top of OOP, since you just implicitly pass the "this" pointer around.

      The problem would, of course, be performance. It would be better performance if we assumed an FOP model then did something like GTK+ for all OOP implementations.. In this fashion, you get all the benifits of code-robustness inherent in OOP, but get the performance and compatibility of FOP.

      What I would instead advocate (and I forgot to include it in another post), is that we might find some common intermediate ".o" language. You'd have egcs be a front end for all your langauges, then save them off in what-ever form you want in .o. Then you use the same set of tools to analyze the .o or bring to a linkage level, which in the case of C means, write out to assembly, and in the case of Java, perform a platform dependant JIT optimization and interpret byte-codes. The only _real_ benifit to this would be that you'd have a common tool that you'd pass around, and you'd have the equivalance of comipled data - namely, people could not read your source code (which for-profit orgs tend to like), and you'd have taken care of a lot of the CPU-overhead involved in compilation. You would just have one last pass to perform for your particular platform so that you could make platform-dependant optimizations. This would all be part of the installation process. You have one set of code that can be brought to any platform. This code is a mixture of compiled C, Java, and even Perl. You just have to pass it through the platform-filter once, and away you go. Those filters can decide if they want to write anything out to optimized files (like .out, .so for C, or JIT stuff).

      Unfortunately, that's a lot of work to accomplish very little. Essentially you're able to have a directory tree of .o files and have no idea what language they're in. Your target's egcs package would have to have ALL libraries of possible HLL languges. Something that might not be desirable.

      -Michael
      --
      -Michael
    5. Re:Problem is, JVM is optimised for Java by DickBreath · · Score: 1

      I mostly agree with what you say. This can all be worked around -- except for tail recursion.

      I don't mean to say that it can't be worked around.

      But for the kind of languages I'm interested in compiling to JVM, the lack of tail recursion support hits me right smack in the balls.

      --

      I'll see your senator, and I'll raise you two judges.
    6. Re:Problem is, JVM is optimised for Java by Roy+Ward · · Score: 1

      Actually, it is a problem with both (or maybe not JVM according to another reply). I'd gone offtopic to the extent that I was only looking at JVM in response to another post. I don't actually know what MS .NET/CLR can handle, becuase I don't have the specs.

      There are two ways I can see of dealing with this sort of problem:
      (1) Try to have a generic object model in the intermediate language that can handle most sorts of source language object model,
      (2) Have the intermediate language be very low level (quite near to assembler, but not processor specific) so that it doesn't have an object model at all, and that is built on top. Of course, this still requires some genericity in the linker.

      I'd probably personally favour (2) because I am a functional programmer rather than an object programmer. YMMV.

  14. Re:What I like about Java and where I hope it goes by Anonymous Coward · · Score: 1
    The latest IBM VM is as fast and sometimes faster than C++ ...

    ... which is interesting, as so I can write a JVM in C or C++, use it to run code written in Java and it goes faster than the native code ?

    To me that means with Java I'm able to create energy out of nothing. An input of 100% gets me an output of 150% ? Now that's really a good one.

  15. Re:Might be preemptive, but.. by King+of+the+World · · Score: 1
    Browsers work well as a replacement for software that deals with text (ie, email) but is little use for general purpose. Browsers have no idea of GUI or command line - browsers aren't suited for all apps, or most, even.

    Oh, and an X display? Bah. If you're looking for remote displays choose something designed for thin clients.

    Bah humbug!

  16. Re:It's all about the portable libraries by Sir+Runcible+Spoon · · Score: 1

    IBM apparently have a source to native, or bytecode to native compiler, that is now part of the VisualAge for Java dobury. I don't know much about it there is a reference here on alphaworks. Goto "Technologies" -> "Java" -> "High Performance Compiler for Java".

  17. Re:Why not standardize the BYTECODE? by Pink+Daisy · · Score: 1

    Well the JVM obviously is such a beast. In fact, aside from support for any language, you are almost describing Java. Granted, compiling a pointer based language to Java bytecode is a non-trivial problem, but it should be possible. I read here that the Microsoft.NET platform aims to be exactly what you describe, with a bytecode that is coupled to C#, but is designed to be easy to target from other languages. With those two VM's, another would be redundant, even if it did have a cleaner and more portable design. In the end, I don't think any standardization efforts will be tremendously successful. If the whole world could agree on what bytecode was best, we wouldn't have to target different architectures for processors, either.

    --

    If you are modding me down because you disagree with me, use the "Flamebait" category, not the "Troll" one.
  18. Re:Unfortunately, learning Eiffel is a waste of ti by bowb · · Score: 1

    Even though Eiffel is not widely used, there are important principles that can be learned from it. Learning Eiffel is not a waste of time.

  19. Might be preemptive, but.. by Masem · · Score: 2
    This *won't* be a competitor until there are Windows builds of everything. Yes, this is an alpha project, so it's a bit early, but if they want to provide the competition, this should be high priority.

    --
    "Pinky, you've left the lens cap of your mind on again." - P&TB
    "I can see my house from here!" - ST:
    1. Re:Might be preemptive, but.. by setec · · Score: 1
      I agree.
      I hate to say it, but it's true. Windoze DOES HAVE a monopoly at this point, and whether you like it or not, you have to respect that. Like the saying goes, "If you want to write software, and you want to make money, you make software for windows."

      ================

      --

      ================
      Microsoft is not the answer, Microsoft is the question. The answer is "no".

    2. Re:Might be preemptive, but.. by ichimunki · · Score: 2

      Let's see. Browsers have no idea of the command line? Isn't the Address field a sort of command line? I admit the "language" is pretty dull right now, but it seems to be a good jump point. In fact, as far as GUIs go, the idea of a single line command line is a great innovation. This would be why there are applets for KDE and GNOME that insert a single command line into the taskbar.

      Browsers don't do GUI? What's with all the buttons and rollover effects and stuff then? This is all just text? Even the text is more interactive than standard text, it's so advanced they call it "Hyper-Text". You can point at it and click on it! This is far more than normal text handling. In fact, I'd say that most word processors have begun to add features along this concept of linking within a document because of how much everyone likes it in their browsers.

      So instead of carping about the inadequacies of browsers, which in this case would be redundant on top of an X server (you need to run X to run a browser, so why not build the app to run as an X client directly). Or furthermore cursing the usefulness of X on the vaguely requirement defined "thin client" (you are really in danger of starting some sort of client anorexia here, the average client has a fast chip, plenty of memory, and a decent HD these days-- if my local library, businesses, etc are any indication). Why don't you offer some insightful suggestions as to alternatives, and relate that back to the discussion of Internet C++ (which sounds like a good buzzword to attract VC in the wake of C Sharp).

      --
      I do not have a signature
    3. Re:Might be preemptive, but.. by DickBreath · · Score: 1

      I'll give you that browsers aren't suited for some apps. This does not mean that the number of apps suitable for browsers is small or unimportant.

      The issue I was really getting at was that a browser is the client that everyone already has. Usually in several flavors. On every platform kwnon to mankind.

      Therefore if you want to take over the Internet server space, you better be thinking about the fact that everyone already has browsers.

      One more thought: using Java Applets, you can greatly expand the capabilities of browsers. Have you ever used VNC to remotely control another machine via. only a web browser? It's cool. Have you ever seen a telnet applet in a browser? (Yes there is one.) I think just these two examples (there are more) illustrate just how large is the universe of applications that can be run using just a common ordinary browser as the client. Something everyone already has.

      If you're trying to "take over the Internet server space" and you're thinking of X or something like X but not as bloated, then you've additionally got to overcome the problem of getting everyone in the world to obtain and install your client -- plus providing a version of your client that runs on all platforms. If you're thinking of X (or something simpler) then you should look at VNC again. The client is a Java applet that runs in a browser. Did I mention it runs in a browser?

      --

      I'll see your senator, and I'll raise you two judges.
    4. Re:Might be preemptive, but.. by King+of+the+World · · Score: 1
      No, the address field isn't a command line. I can't pipe, anyone can't do much with it. It's more like a unique file|software location, C:\windows\wankitywank, /dev/null/ or http://holloway.co.nz, it's all the same.

      No, browsers can't do GUI. They can display pictures, but I surely hope you don't consider that a GUI. They have no sense of windows or workspace areas. What's more, the in-browser DHTML toys that simulate a GUI have to reinvent the wheel each and every time. I can't choose the most basic GUI settings (border width, if I want SDI windowing, what colour I prefer my title bars to be - and many other less cosmetic settings that most users and visually impaired monkeys alike would need to consider it a modern GUI). Nothing's native, which means no user control over anything.

      Nope, mouseover doesn't qualify either.

      Client Anorexia, excellent term! And yeah - the average client does have a fast CPU and large HDD - but most of them have cruddy dialup bandwidth. X can't travel over that. X is just used as a graphics buffer these days.

      Granted, there are many wonderful things that browsers have (fallback font-familys/hypertext/a level of client control/future compatibility/well structured HTML being resolution independant/layers) but browsers*1 will only penetrate software markets that deal with simplistic text, and thats all.

      Hell, Amiga Workbench was better than this GUI.

      You can't edit images (palette at the side, click and draw), edit documents with varying fonts (a textbox with one font, one colour, one font-size, w00p) you can't play music (unless you have a pluggin - but more importantly there isn't a cross-browser way of playing music)

      So no, browsers aren't nearly there as a GUI. They make Motif like powerful, elegant, and sexy.

      Oh, and no - I'm not about to chat in the discussions of Internet C++ - but I will go see if there's a mailing list :)

      (please excuse my bitching - being the king of the world - i'm expected to act this way ;)

    5. Re:Might be preemptive, but.. by King+of+the+World · · Score: 1
      You've kinda convinced me.

      (and yes i've used VNC, telnet applets, irc applets).

      Although users wouldn't see the difference between Java and Browser - W3m is a browser - and it can't do that. I hope it doesn't take the direction of Java as there's little accesibility for visually impaired users.

      I'm sure that when a decent framework for GUI and applications comes along they'll call it a browser too - perhaps browser++ (hmm.. browser++.com) - but my point is/was that browsers don't suit non-textural applications at the moment.

      Yeah.. I guess the installed user-base does matter.

    6. Re:Might be preemptive, but.. by mwa · · Score: 1
      Maybe not, BUT... The concept is Internet C++, e.g. applications running on a server with a "thin client". IOW, all you should require on the client end is an Xserver. In order for the *nix base to be portable to Windows, you need some X compatibility libs an an Xserver built into the VM.

      Whether they can pull something like this off remains to be seen, but if they can, so much for Windows 2000 taking over the internet server space.

    7. Re:Might be preemptive, but.. by DickBreath · · Score: 1

      It seems to me that to take over the Internet server space, you need the client to be a BROWSER, not an X display.

      Maybe Microsoft's Windows 2000 will take over the Internet server space, while Internet C++ takes over the Unix serving X displays server space. (This would be a sad day, IMHO.)

      --

      I'll see your senator, and I'll raise you two judges.
  20. Re:Oh, you would be a "l337 0ldsk00l h4x0r" then by Dave+Emami · · Score: 1

    He who writes the code should decide what to with errors, and where.

    "C is the language that believes that the programmer knows what he wants and deserves to get it, good and hard."
    -- H.L. Menken, paraphrased

    --

    "The Greens lynched a hacker in Chicago. Last month, but I think the body's still hanging from the old Water Tower."
  21. Re:Is anyone or any business really gonna back C# by davidmb · · Score: 1

    Surely that's one of the reasons why it could succeed?

  22. Re:Initial observations on the VM design by Anonymous Coward · · Score: 1

    You UNIX bastards think you have won,
    But VMS and ASS400 still make bill-ions

  23. Re:good in a way, bad in a way by Wolfier · · Score: 1
    Almost all languages are not based on C.

    I don't like C/C++ as a language too, just that, when you have to know these to make a living today (and probably the next 5 years too), you don't have a choice.

    I am completely for the idea of writing everything in a nice scripting language (my current favorite: Ruby, previously covered by Slashdot, with the exception for the OS, drivers, and games.

    Back to Ruby: it has evolved to version 1.6.2, and has basically ALL characteristics of a nice programming language that I want. Some of them are:

    • Although everything is an object, you don't have to create a class for a runnable program, unlike Java. (if you don't specify a class, then the code belongs to the object "main"). Everything can look like non-OO if you want it to.
    • It adheres to the principle of Perl: there is more than 1 way to do things. However, its syntax resembles more like pseudocode of an algorithm. I'd say, power of Perl, readability of Python.
    • Unlike Python, it actually has a keyword that terminates a scope, "end". So you aren't forced to indent if it is not necessary - sometimes indentation can make code less readable!
    • Semicolons are optional.
    • Rich control structures: break, retry, next...
    • You can define your own iterators with very little code, since the iterator is cordial to this language.
    • I have been disgusted by Java and Pascal's
      try {... try {... } except {... } } finally {... }
      WHY are there 2 block levels when you really need only 1? Ruby is beautiful in this aspect: begin ... rescue ... ensure ... end

      Check it out.

  24. Re:honest question by Temporal · · Score: 2

    I second that. IMO, STL is one of the best libraries I've ever seen. It is a wonderful example of what Java can't do, and C++ can.

    ------

  25. I'm confused. by Anonymous Coward · · Score: 3

    Could somebody tell me why I would want to even come near this when I already have Java and Python? (And real C/C++ for when speed is crucial?)

    Both Java and Python are much much nicer to program in than C++. What am I missing?

    1. Re:I'm confused. by pivo · · Score: 1
      Memory leaks should not be a problem in properly designed C++ programs.

      Wow, we have a real programming genius here. Memory leaks are the most common problem with C and C++ programs. Programmers who, in contrast to SquidBoy, live in the Real World know that memory leaks are most often bugs not design problems. A "perfectly" designed program may have bugs that leak memory. If your response is, "well then they're not well designed programs" then my answer to you is there are no well designed programs, since almost any non trivial C/C++ program ever written has had a memory leak at some point in it's lifetime.

      As far as "power", that's relative. I think Java's memory management and exceptions (which are better than C++'s) are more "powerful" than C++'s operator overloading, something I haven't missed at all.

    2. Re:I'm confused. by SquidBoy · · Score: 1

      Memory leaks should not be a problem in properly designed C++ programs. As long as you ensure that a class has responsibility for each dynamically allocated structure/object/array, so that the object destroys it in its destructor (and use virtual d'tors with derived classes), you will have few or no problems.

      There are, I admit, certain things which are easier if you can freely pass around dynamic arrays or lists, Lisp-style. However, a careful programmer should have little problem with memory leaks, and there are numerous tools to help detect them.

      In contrast, automatic garbage collection slows down programs, especially if implemented as reference counting. The point of C and C++ is to allow programmers to have as much control as possible, to write as close to machine language as possible, and to know how their programming constructs will map to assembler.

      The speed differences between C++ and Java are not just due to Java's runtime compilation; Java performs a wide variety of checks on program execution, and implements features such as run-time garbage collection.

      The effect of this is that Java is nicer and easier to use, especially for beginners. However, C++ is MUCH more powerful (operator overloading, preprocessor, multiple inheritance, templates) and inherently much faster, albeit more difficult to program and often more time-consuming to debug. However, you can include run-time checks in C++ to match Java performance, and even implement auto garbage collection, but you cannot skip these in Java.

      In conclusion, C++ and Java are different program languages, and should be able to co-exist - I certainly don't think C++ is ideal as a first programming language in education, and both have different weaknesses for RAD. There is also a lot more C++ libraries available, and (still) more skilled programmers.

      But being able to run C++ on a virtual machine must be a good thing in terms of performance, developer skills, and porting Doom.

      --
      If you're a jock, inflict some pain / If you're a nerd then use your brain - DAPHNE AND CELESTE
    3. Re:I'm confused. by ash5g · · Score: 1

      Java in my experience is far better and logical than C++. Automatic garbage collection is a godsend, and it's far easier to learn Java than C++. The first few versions were really only useful for little applets, but later versions are very good, and are quite fast. C++ is very fast, but it takes longer to debug.

    4. Re:I'm confused. by jilles · · Score: 2

      yes indeed, it says more about your instructor (hopelessly stuck in the past) than about Java.

      --

      Jilles
    5. Re:I'm confused. by ekidder · · Score: 1

      None of that makes Java worse than C++ (and some would argue that it makes Java better :). It just means that Java is /different/. I've done C++, Java, and perl programming. Which is better depends a lot on the task I want to do.
      And just because the instructor thinks Java is worse doesn't mean it is; it just means he doesn't like it :)
      (On a side note, which is better: C++ or Lisp?)

    6. Re:I'm confused. by tie_guy_matt · · Score: 1

      Maybe because there are already many more libraries and applications written in c/c++? You can have a virutal machine w/o rewriting your old code (just recompile.) Care to guess how many lines of code have been written in C/C++?

    7. Re:I'm confused. by davidbro · · Score: 3
      This isn't flaming, but it's obvious that you've never had to track down any non-trivial bugs involving memory allocation or error codes that were never checked.

      When your paycheck depends on shipping code that works on a machine other than your own, you'll appreciate the garbage collection and exception handling.

      No, Java and Python don't solve all of the problems, and there are many things that C++ does really nicely. But I've had to pull less overtime tracking down other peoples bugs since I left C++ behind.

    8. Re:I'm confused. by davidbro · · Score: 2
      Care to guess how many lines of code have been written in C/C++?

      Care to guess how many lines of code have been written in COBOL? Various machine languages?

    9. Re:I'm confused. by tie_guy_matt · · Score: 3

      FORTRAN, COBOL and old CPU's like the z80 haven't gone away yet have they? C/C++ is going to be with us for a long time in the future! People want to find the better next language but no one wants to port the old apps to the new language.

    10. Re:I'm confused. by Emil+Brink · · Score: 1

      (On a side note, which is better: C++ or Lisp?)
      You're kidding, right? If not, then I think a good answer can be found by backing up two sentences in your post: "Which is better depends a lot on the task I want to do". There. In my case, Lisp is better than C when freshman courses require me to use it (um, it was Scheme actually). Luckily, that hasn't happened since 1994. ;^)

      --
      main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
  26. RTL as bytecode standard? by Ian+Bicking · · Score: 2
    RTL is the intermediate representation that GCC uses. The different front-ends for GCC (C, C++, Objective C, Fortran, and Pascal, I think) all compile into RTL, and then on that level optimizations are done and ultimately binaries created.

    Now, as bytecodes, RTL would probably be very slow. It seems (to my most uninformed eye) to be very low-level: appropriate for compiling, but not for interpreting. But if you can make the entire compiling process robust, there's no reason that compiling should make something less portable, as long as you are willing to replace non-conformant OS-level code with your own (standardized) code. Lo and behold, such code even exists! GNU has been writing just this distributable code for a long time.

    Now, I know there must be something wrong with this. As enticing as RTL seems, there must be a reason why people, say, compile languages into C instead of directly into RTL, e.g., many Eiffel compilers, Scheme compilers, ML compilers... and it took a long time for Pascal and Fortran frontends to come about.

    It is also apparent when running cygwin on Windows that while the GNU code is portable to very different environments, it leaves something to be desired. But so far the GNU code has been written with Unix in mind. A little redirection could make for code with more portability in mind.

    There's a lot of work to make such a thing really happen -- but all the pieces are there, and they are more proven than Java et al. GCC is ported to a wide variety of platforms. Compiled programs run fast. RTL is, at least, somewhat language-agnostic (though I'm sure much more could be done -- all the C variants, plus Pascal and Fortran, share a lot in common).

    I'm sure there's a flaw in this... but I'm not entirely sure what it is.
    --

    1. Re:RTL as bytecode standard? by Zach+Baker · · Score: 1
      The flaw, I think, is that you can have non-copylefted front ends to gcc's RTL backend, or vice versa. As in the GIMP plugin controversy, the GNU project and RMS in particular and would be loath to allow such things. The gcc/proprietary-software combination would result in funky Franken-compilers -- that's right, compilers that look like they've been written by Al Franken. No, I mean you get into some very sticky licensing issues. Sources say that RTL has been in some respects deliberately obfuscated to prevent this. By "sources say," I mean that I think I heard this somewhere or something.

      As it seems, yet again, the fault lies not in our code, but in our licenses.

  27. kewlest??? by wackyboy · · Score: 1

    All I know is in there "Vision for the new internet" they used the pronoun "kewlest" and that can't ever be good.

    1. Re:kewlest??? by spack · · Score: 1

      I'd have to agree there. It's hard to look at something seriously when such descriptors are used. Granted, I myself think in terms of "that rocks", "it kicks ass", "this is the bomb", or the like. But, I would not be using such terminology in anyway that supported such a (supposedly) serious project. And when you start claiming to have something better than Java, which is becoming more and more established, you'd best be backing this up with professionalism.

      At least spell "coolest" right.

      --
      For those who fight for it, life has a flavor the sheltered will never know.
    2. Re:kewlest??? by nsadhal · · Score: 1

      kewlest is a pronoun? i thought it was an adjective.

    3. Re:kewlest??? by wackyboy · · Score: 1

      It is an adjective... I forgot to pay attention in English class. I also use the wrong "there"... I should have said their.

  28. Re:Do you have any idea what you are talking about by Paradise_Pete · · Score: 1
    Computers are getting faster and cheaper every day.

    Actually there was a day a few weeks ago when they stayed the same.

    Pete

  29. Re:Java's problems are not limited to performance by flumps · · Score: 1

    Hogswash! One of my main dislikes about C and C++ was that header files could float around like dead fish at the top of a pond. Which contains what function prototypes and what definitions? Theres only so much a filename can tell you, and if you've got a large project you have to search for ages to find the right info. Javadoc does this all for you, you know exactly what a class does and why it does it.

    As for using multiple inheritance, read this and see why its not a good idea before you slag something off you dont understand.


    ~matt~
    0
    o
    .
    ><>

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  30. A better language comparison... by gwonk · · Score: 1

    In the latest IEEE Computer (Oct 2000) there is a comprehensive article comparing C, C++, Java, Perl, Python, Rexx and TCL. The results are different than in the link that you provide.

    The abstract for the article can be found here. You need to be a member to get the whole article.

    Anyway, the findings that could be of interest here are "...the C and C++ programs run only about twice as fast as Java. The script programs tend to be faster than the Java programs." and "The typical script program consumes about twice as much memory as does a C or C++ program. Java programs consume three to four times as much memory as C or C++ programs."

    The only issue I have with the research is that only one OS platform was used, a Sun Ultra II. I would like to see the executions performed on a few more systems, at least a Linux/BSD system and a Windows Box. While this might not affect the non-Java languages much, Java is heavily influenced by the JVM in use. It is wide known that (other than the IBM JVM on linux) the windows JVMs tend to be the fastest available.

    OTOH, the testing approach looks good and more work should be done to validate and extend the research. The Internet C++ guys should use the same tools to get a good performance comparison.

    gwonk
  31. What about FORTRAN? by minkwe · · Score: 2

    All this talk about languages that matter and no mention of FORTRAN. Maybe it's FORTRAN that needs a facelift; and given that there a lot of investment in FORTRAN code in the scientific community we could as well have Internet FORTRAN --- Just for the record

    --
    "Fighting terrorists with millitary might is like killing a mosquitor on your Dad's forehead with a rifle."
  32. The *real* issue by cshotton · · Score: 2
    What will prevent this from being adopted is that the VM itself seems to be proprietary. I wasn't able to find the source code to it anywhere, and given all the talk on the site about investors, it doesn't look like they have an incentive to open it up.

    It's likely you could reverse engineer one based on the development tools' source and output. But this is only going to work if it's ported to every OS and CPU type possible. Keeping the VM locked up will definitely hamper this.

    --

    Shut up and eat your vegetables!!!
    1. Re:The *real* issue by pH-j · · Score: 1

      http://www.xmission.com/~icvm/downloads.html Quote: You may download the source code and compile it, if you wish. You will need a minimum GCC version 2.95.2 to recompile the virtual machine with the same results we are getting. The virtual machine (ICVM) uses features present in the later revisions of GCC to achieve some of its optimizations.

  33. Re:You've Confused and Saddened Us All by maraist · · Score: 2
    First, let me state that I love all of C, C++, Java, Perl, and Python. I enjoy programming in each language (though I'm baised towards Perl because I do a lot of web-apps).


    1.) Java sucks because everything is passed by reference: When you take upper level classes and concepts like the call stack are explained to you, you will realize that passing Objects around by value is expensive, inefficient and wasteful. Even in C/C++ non-primitives are usually passed by reference either via pointers or explicit references.


    Umm, pass-by-reference can be significantly slower than pass-by-value. In ref's, you put into the calling function's argument registers a pointer, which must then be dereferenced. Ideally, the contents are in L1-cache, but if you haven't used them in a while, they may be off in slower memory. Today, when memory is an order of magnitude slower than the CPU, that makes a significant difference. IF, the c-struct can fit within the argument registers (as might be the case in SPARC, IA-64 architectures for small-to-medium DTs), then you can make several calls deep without ever touching memory (so long as you don't use any pointers). Now, admitedly, x86 and many other's have a register shortage, so this probably doesn't apply to them (except that the contents would have been garunteed to be recently accessed, and therefore could be in an L0 cache (such as in the Athalon; at least, I assume this is what L0 is useful for)).

    As an interesting point (I'd like to learn more on it), how does C++ do the following:

    void foo( int& arg );

    If it's nothing more than a transparent pointer, then C++ definately has less performance capability than C. If, however, it's a true alias, and you are passing-by-value, then architectures like the SPARC, Athalon, and IA-64 get a double bonus, since their calling parameter is the same as the returning one (thereby saving several regs).

    That said, interpreted languages such as Java, scheme, Perl, etc require expensive operations to be performed for each op-code (or segment of text), so most of the point is mute. Especially since their data-structures contain a lot more bloat than just the desired value. (Note: I use the term interpreter because these languages do not compile directly to assembly. Their meta-data must be interpreted to determine code-flow. If you give me a better substitute for a word then fine, but you can NOT call perl or Java any more compiled than scheme; The compilation stage is simply more explicit and optimal).

    It might be possible, however, for the interpreter to pass-by-value the low-level data-structure to the internal control-flow function, say as in ADD(DS& TO, DS& L, DS& R). With this, the intermediate operations which require internal-function calls could be optimized away. It's more complicated to analyze Java, especially with the JIT, but similar sorts of optimizations utilizing passing raw-values instead of just the pointers could be implemented.
    The problem is that a function call has so much over-head in an interpreted language, that little of this matters.

    Lastly, to the real point that the first guy was making. He doesn't like having to _use_ references. Well, in Java, you never know that they're references (except when you try and copy something). I rarely actually do a copy, so I can't imagine what his problem with it is. In C, you have the distinction between access and dereference, in Java, they both "look" like access, namely Foo.var, as opposed to Foo->var. Personally, I prefer the uniform access types (fewer errors). As for the lack-of-safety for modifying called parameters, you at least have low-level types in Java to avoid this. Beyond that, any really large data-structure is almost always passed as a pointer in C, so I can't imagine there's a debate here. Perhaps I'm being naive in comparing Java to C. Is there something that gets the job done better than Java or C/C++? Perhaps you might advocate Perl, which can do either references OR static-types (but no pointers). I can't imagine writing Word in Perl though; there's just too much over-head for a large-scale app, unless perhaps you were only trying to connect together GNOME/Qt components with Perl glue, but you'd still have written most of the components in other languages (like Java / C).

    -Michael
    --
    -Michael
  34. Do you have any idea what you are talking about? by Dacta · · Score: 3

    ...e.g. Collections/containers/algorithms that aren't the abomination that is STL.

    I do Java and C++ professionally, and believe me - the STL is the best thing to happen to C++, ever. It makes C++ accessable and almost as easy to program in as Java, and it's performance is wonderful. Not only that, it makes writing reusable code simple, and lets you worry about the logic of your program rather than supporting classes like collections.

    If you really thing the STL is an abomination, the either you are using a very early version or your programs are very different to what I write.

  35. Re:It's all about the portable libraries by bockman · · Score: 1
    I think the concept of the JVM is still quite valid, even for applications - however, what really needs to be done is to make it so that multiple Java apps share the same VM.

    Interesting concept. I noticed that when you have seveal Java apps running, even big machines start bending under the weight of several JVM.
    Anyway, I'd really like to skip the WM for apps I don't need to have portable binaries.

    As for the libraries - what sort of list are you talking about? The Java Collections framework (standard in 1.2 and above, availiable as library for 1.1.x) provides most of the collections you'd need.

    Yes, and I use most of them quite often. But IMO they imposes a quite lengthy notation stile, which could be shortened without loosing elegance if the language itself supported high-leve data structures (not as libraries,albeit standard ones). If you'd look at lists or ash in Perl, or at lists/tuples/dictionaries in python, you would know what I mean : same functions, but with a more compact notation style.

    there are other GUI toolkits (like bonobo(sp?)

    The only bonobo I know of is the component-model being developed with gnome ... there are others?

    another poster said that you can get a lot of the benefits of generic programming through use of interfaces

    That was me (I talked a lot today ;-). Nice that we agree on something (more that that actually : I like Java - mostly the language itself, but I'm also comfortable with the libraries ).

    --
    Ciao

    ----

    FB

  36. Re:Doom is jumpy? by Gyles · · Score: 1

    Doom is jumpy? (Score:3, Funny)

    > If Doom is jumpy on any kind of modern system then you know that this is one inefficient port.

    I'd say that sounded pretty serious to me...

  37. Re:good in a way, bad in a way by Wolfier · · Score: 1

    And, I forgot.

    While basically everybody else's Exception handling is a last resort. There's something from BASIC a language can learn from:

    ON ERROR GOTO Haha... --- trap an exception

    Haha:
    RESUME NEXT --- GIMME this construct!

    With Ruby, you can do that too.

  38. Re:Why not standardize the BYTECODE? by flumps · · Score: 1

    Why dont we just all agree on one computer platform to use? If we all had the same computer, all this talk wouldnt be necessary at all.

    Lets all throw away macs, pcs and sparcs and do all our coding on a commodore 64 :)


    ahh.. I miss the old days..

    ~matt~
    0
    o
    .
    ><>

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  39. Re:Oh, you would be a "l337 0ldsk00l h4x0r" then by SquidBoy · · Score: 1

    Erm, C, C++, different languages. Hahaha!!!

    --
    If you're a jock, inflict some pain / If you're a nerd then use your brain - DAPHNE AND CELESTE
  40. Re:Why not standardize the BYTECODE? by flumps · · Score: 1

    Why dont we just all agree on one computer platform to use? If we all had the same computer, all this talk wouldnt be necessary at all.

    Lets all throw away macs, pcs and sparcs and do all our coding on a commodore 64 :)


    ahh.. I miss the old days..

    ~matt~
    0
    o
    .
    ><>

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  41. Re:Java's problems are not limited to performance by mughi · · Score: 1



    Writing code in Java is only going to get you RSI.


    Well... that's why emacs has the handy little alt-/ completion. To do the typing for you



    Of course, I did work with one guy who did all his Java typing in Python. Very fast, productive and low-bug guy.

  42. Re:It's all about the portable libraries by Ben+Hutchings · · Score: 1
    I hope they succeed. Java-the-language managed to clear most of the worst nasty things of C++ without taking away much power.

    I suspect you have an out of date idea of the C++ language. Java has nothing to match the power of C++ templates (generic programming). It doesn't even allow the definition of new type names, as even C does.

  43. Re:Cross Platform C++ libraries by SpryGuy · · Score: 1

    ....funny?

    - Spryguy

    --

    - Spryguy
    There are three kinds of people in this world: those that can count and those that can't
  44. Re:What I like about Java and where I hope it goes by Anonymous Coward · · Score: 1

    It's possible in theory since the Just-In-Time (JIT) can do optimizations at run-time when it can have useful information available that simply isn't there when static compilation is used.

    It's much more feasible to predict the paths of execution at runtime than at (static) compile time.

  45. Re:It's all about the portable libraries by Corrado · · Score: 1
    If you think Java is still slow, you haven't seen really good Java. It is still not as fast as C/C++ (or assm for that matter :) but it is highly usable. I have been using Sun's Forte for Java lately and am really amazed at the speed. The only time I realize I'm under a JVM is when the garbage collection kicks in, then the IDE stops responding for a second or two. But that's it. Java 1.3 has really impressed me -- it is MUCH better (faster) than 1.1 or even 1.2!

    I am running WinNT 4.0 on a PII 366 Mobile processor (work machine) with 224MB and it simply flies. Just be sure and give it *lots* of memory and Java is perfectly happy. :)

    BTW: I am using Xalan & Xerces for XML processing and the speed seems really good under Java.

    Later...

    --
    KangarooBox - We make IT simple!
  46. Re:good in a way, bad in a way by descubes · · Score: 1
    It's funny, because I have designed such a non-C based language. And it is called... "LX", like the login name of the original poster. No, that wasn't me. The language is shortly described there. It is designed to integrate in a visual, language-agnostic programming environment called Mozart. It is open-source, you can download and try it.

    Of course, at this point, it won't do much for you. As a proof that it can do more than LX, Mozart contains a Java to Java translator that can serve as a pretty-printer and be used to implement all sorts of Java extensions. LX parses and does some basic semantics analysis, but nothing very serious yet.

    Getting rid of the C legacy enables tons of things. Such as optimizing on modern processors :-)

    --
    -- Did you try Tao3D? http://tao3d.sourceforge.net
  47. Re:Lisp. by pivo · · Score: 1

    The other one being Perl

  48. Power != ease of use by xr6791 · · Score: 1

    Memory leaks ARE a problem, even in properly designed software. Loads of library calls return pointers to memory areas that is YOUR responsibility.

    Yes, if you are irresponsible, the memory leaks are a problem.

    Of cource C++ is much more powerful than Java, but so is perl when processing large textfiles. It's all about choosing the right tool for the job.

    You miss the point. The C/C++ are the most powerful languages because you can control everything. No run-time checks ala Basic get in your way, no auto-zeroing of newly created variables, etc. You are responsible, you get the speed. Do you know what language was used to write Java or Perl? It was neither Pascal nor assembly nor Java. It was written in that obscure language that is considered "dirty" by those who dont understand it at all (Java crowd). Remember, power != ease of use.

  49. Re:Not really open by Simon+Brooke · · Score: 2
    Sice most of the code is in a difficult to understand file with over 200000 lines, how can it be consdered open?

    Just because something is too hard for you to understand, doesn't mean it isn't open. Some things are intrinsically hard. Some things are badly written but open; provided they're open, we can study them and rewrite them better.

    Open Source is not the same as Dumbed Down Source; if you want to take part, you may have to work.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
  50. So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

    There's a good possibility that I'm the instructor being referred to. Before you call me a clueless academic, let me give you some of my creds:

    - I've been programming for twenty years.
    - Almost all of my work experience (including all of the last five years) has been in industry, doing hands-on programming.
    - I built the NewsTracker service for Excite.
    - I wrote about half of the microcode for the MasPar MP-1 series of massively-parallel computers.
    - I'm willing to use my real name when posting my opinions, and not hide behind a pseudonym :-).

    In my opinion, Java may be fine for applets, but it is utterly unsuitable for large software projects. I'm going to write up a comprehensive critique of Java sometime within the next few months, but for the moment, let me toss off a few problems that immediately come to mind:

    - No real analog to const. The "final" keyword only prevents assignment. It does not prevent modification of the object referenced. I consider "const" correctness an important part of good program design, as it helps you catch many errors at compile time, and also acts as documentation for your code.

    - In a similar vein, no notion of a "const" method. In fact, you can have a "final" method, but its meaning bears absolutely no relation to the use of "final" when applied to variables.

    - No reliable destructors, so you cannot use the "resource acquisition is a constructor and resource release is a destructor" idiom that is so useful in C++. This idiom is useful because it allows you to remove opportunities for error from your program (you can't forget to release a resource).

    - Java is a "police state" language, meaning that its designers have decided that they are smarter than everyone else, so they will dictate the programming style everyone has to use. For example, all functions must be class members, all exceptions that may be thrown (except for RuntimeException and Error) have to be declared with a throws clause, etc. There are good arguments against many of these decisions, in at least some circumstances.

    The designers of C++, on the other hand, were a bit more humble. They left the language amenable to a variety of programming styles. This has allowed people to experiment to find out what really works, rather than being forced to accept some doctrine handed down from on high.

    - The reference semantics combined with "by-value" syntax for objects cause a lot of confusion for beginners. The fact that you *only* have reference semantics for objects causes design problems. For example, there is a real conceptual and design difference between a container of objects and a container of references to objects, but Java mixes the two ideas together. This results in situations where code outside of an associative container class (like a set) can screw up the associative container by modifying the state of objects contained in that container.

    - The lack of templates means that one loses some of the power of typechecking, and one has to resort to some pretty clumsy and awkward means of dealing with container classes. For example, in C++, I can have an associative array mapping keys of type K to values of type V, for any types K and V, through the use of templates. The analog in Java is a container that maps Object to Object. The problem here is that I have to do widening
    conversions that weaken typing. Strong typing is important because it is an extremely useful tool for catching errors very early -- at compile time
    -- instead of at run time, when they are harder to deal with. With Java I can no longer guarantee that all my keys have one type, and all my values
    have one type. When I retrieve values, I have to do narrowing conversions, which may result in a run-time type error that I should have been able to catch at compile time. And what if I want to put values of a primitive type in a generic container? Then I have to resort to the truly
    hideous kludge of using these wrapper classes to turn them into objects.

    - The vast gulf in behavior and syntax between primitive types and object types is a nasty misfeature of the language that throws up barriers to writing generic code.

    1. Re:So I'm a "clueless academic", am I? by flumps · · Score: 1

      I'd just like to address these points on your interesting post (well, at least it was interesting to me :)

      No reliable destructors, so you cannot use the "resource acquisition is a constructor and resource release is a destructor" idiom that is so useful in C++. This idiom is useful because it allows you to remove opportunities for error from your program (you can't forget to release a resource).

      You do not need to do it. Java ?never? forgets to deallocate the resource anyway when its not needed anymore. Why do you want belt *and* braces when braces will hold your trousers up anyway?


      - Java is a "police state" language, meaning that its designers have decided that they are smarter than everyone else, so they will dictate the programming style everyone has to use.(snip)

      The java programmers have not decided that they are smarter, they were working with an agenda in mind. That agenda was to remove the reliance on such things as pointers which can kludge up code on different platforms.

      For example, all functions must be class members, all exceptions that may be thrown (except for RuntimeException and Error) have to be declared with a throws clause, etc.(snip)

      There are good reasons also to be object oriented fully in a languages nature - it teaches good programming practice. Exceptions are a good way of determining that something illegal has happened without knocking out the entire app. Many times I've thanked the JVM for not knocking out an Java application completely that i'm trying to use.


      Apart from that, i tend to agree with what you are saying. All I can say is they must of had a reason to do it this way..


      "They" know best i suppose..

      ~matt~
      0
      o
      .
      ><>

      --
      "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
    2. Re:So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

      >> No reliable destructors, so you cannot use the
      >> "resource acquisition is a constructor and
      >> resource release is a destructor" idiom [...]
      > You do not need to do it. Java never forgets to
      > deallocate the resource anyway

      That's taking a shortsighted view of what constitutes a resource. Memory isn't the only resource that is acquired or released. Here are some other examples:

      - Opening and closing files. In C++ the destructor for an iostream flushes and closes the file -- and this happens as soon as the iostream object is deleted (if dynamically allocated) or goes out of scope. Contrast this with Java, where even if you do put cleanup code in a finalize method, the finalize method only gets executed when AND IF the garbage collector gets around to reclaiming the storage. (That's right. There is no guarantee that the finalize method will actually EVER be called.)

      - Locking and unlocking a mutex. In C++, you can write a wrapper class for which the constructor locks a mutex and the destructor unlocks it. Thus, to protect a piece of code as a critical section, you just write
      {
      mutex_wrapper mw(the_mutex);
      ;
      }
      This way, no matter how you exit the critical section -- returning from the function, throwing an exception, whatever -- you cannot possibly forget to unlock the mutex when you leave.

      > The java programmers have not decided that
      > they are smarter, they were working with an
      > agenda in mind. That agenda was to remove the
      > reliance on such things as pointers which can
      > kludge up code on different platforms.

      First of all, the use of pointers has nothing to do with platform portability. Secondly, I find that I rarely use pointers when I write C++ -- by using the Standard Library container classes, my own container classes, and highly-efficient smart-pointer classes, I've found it possible to eliminate almost all of the problems people have with pointers.

      Finally, I like C++ over Java for much the same reason I like Unix/Linux over Windows. With C++ and Unix, it's "have it your way". With Java and Windows, it's "have it Bill's way" (Bill Joy or Bill Gates).

      > There are good reasons also to be object
      > oriented fully in a languages nature - it
      > teaches good programming practice.

      I disagree. OOP has become something of an unexamined mantra, and people assume that OOP and good programming practice are the same thing. I would argue that OOP is a useful tool, but don't get so excited about your tools that you use them where they are not appropriate. Remember the old saw that "software engineering is a simple matter of finding the right wrench to pound in the right screw."

      In particular, there is nothing virtuous about the object.function(args) syntax over the function(args) syntax. It's nothing more than a fetish. The most important contribution of OOP was support for abstract data types (hiding implementation details, providing limited interfaces). Inheritance is useful on occasion, but widely overused and abused. (For example, a lot of OOP enthusiasts think that code reuse and inheritance are synonymous.)

    3. Re:So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

      One other comment I forgot to make:

      > Exceptions are a good way of determining that
      > something illegal has happened without knocking
      > out the entire app.

      Yes, of course. That is why C++ has had exceptions since before Java was released to the world.

    4. Re:So I'm a "clueless academic", am I? by AKAImBatman · · Score: 1
      You know, it's this type of acedemia that gets companies stuck with unmaintainable, buggy, non-customizable software. Ok here we go:

      No real analog to const. The "final" keyword only prevents assignment. It does not prevent modification of the object referenced. I consider "const" correctness an important part of good program design, as it helps you catch many errors at compile time, and also acts as documentation for your code.

      Why is this a problem? If you absolutely need a static class, use a static class. I have done many a servers/programs in Java and have never had a problem. As for docs, that's why there is that wonderful thing called JavaDocs that half the C++ industry has been trying to emulate.

      In a similar vein, no notion of a "const" method. In fact, you can have a "final" method, but its meaning bears absolutely no relation to the use of "final" when applied to variables.

      <sigh> This is because you misunderstand the final keyword. In general, final means that the item cannot be overridden by an extending class. It produces a similar function with variables.

      No reliable destructors, so you cannot use the "resource acquisition is a constructor and resource release is a destructor" idiom that is so useful in C++. This idiom is useful because it allows you to remove opportunities for error from your program (you can't forget to release a resource).

      Really? Guess I'll just throw this code away:

      public class openfile
      {
      InputStream in = null;

      public openfile(File myfile) throws IOException
      {
      in = new FileInputStream(myfile);
      }

      ... //Accessor code goes here

      protected void finalize() throws Throwable
      {
      in.close();
      }
      }

      Damn! That looks like the resource will be closed just before the class is garbage collected!

      Java is a "police state" language, meaning that its designers have decided that they are smarter than everyone else, so they will dictate the programming style everyone has to use. For example, all functions must be class members, all exceptions that may be thrown (except for RuntimeException and Error) have to be declared with a throws clause, etc. There are good arguments against many of these decisions, in at least some circumstances

      And? I happen to use Java because I agree with them.

      The designers of C++, on the other hand, were a bit more humble. They left the language amenable to a variety of programming styles. This has allowed people to experiment to find out what really works, rather than being forced to accept some doctrine handed down from on high.

      Wait a minute. Doctorine on high... Hmmm... Isn't that what you're dishing out? Oh, wait. I'm sorry. My 12+ years of programming experience in everything from COBOL to C to Java doesn't count. Darn.

      The reference semantics combined with "by-value" syntax for objects cause a lot of confusion for beginners. The fact that you *only* have reference semantics for objects causes design problems. For example, there is a real conceptual and design difference between a container of objects and a container of references to objects, but Java mixes the two ideas together. This results in situations where code outside of an associative container class (like a set) can screw up the associative container by modifying the state of objects contained in that container.

      True enough. But on the other hand they need to understand primitives and pointers anyway in order to program C/C++, so they might as well learn them in Java too.

      The reference semantics combined with "by-value" syntax for objects cause a lot of confusion for beginners. The fact that you *only* have reference semantics for objects causes design problems. For example, there is a real conceptual and design difference between a container of objects and a container of references to objects, but Java mixes the two ideas together. This results in situations where code outside of an associative container class (like a set) can screw up the associative container by modifying the state of objects contained in that container.

      Huh? If you've got the object, you've got the object. You are free to modify it. I can cause the same havoc in an Object container just by keeping a pointer to it. You aren't protecting yourself from didly.

      The lack of templates means that one loses some of the power of typechecking, and one has to resort to some pretty clumsy and awkward means of dealing with container classes. For example, in C++, I can have an associative array mapping keys of type K to values of type V, for any types K and V, through the use of templates. The analog in Java is a container that maps Object to Object. The problem here is that I have to do widening conversions that weaken typing. Strong typing is important because it is an extremely useful tool for catching errors very early -- at compile time

      You don't seem to realize that this is a double edged sword. If you enforce a type at all times, you can have no genericity. The choice was made toward genericity in Java, and I have never had any problems with type. In fact, I have had far more problems with an enforced type checking that our current appserver does with its internal Data Language. I don't like it and far prefer Java's approach. Especially when I can easily do:

      if(x instanceof Integer) {...}


      Personally, I'd rather go outside and shoot myself than have to go back to templating classes.

      Anyway, I have work to get done. If you want to argue it out, I can be reached here.

    5. Re:So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

      > When you are done with your object, call dispose

      And what if you forget to call dispose? Then you're hosed. That's the beauty of real, honest-to-God destructors: they get called automatically. You can't forget to call them. They are a very powerful tool for preventing yourself from even having the opportunity to make a mistake.

    6. Re:So I'm a "clueless academic", am I? by AKAImBatman · · Score: 1
      That's the beauty of real, honest-to-God destructors: they get called automatically.

      Yep. And they work really well when you don't pass the object by reference and the deconstructor gets called with the stack cleanup. (Sucks, trust me. :-))

    7. Re:So I'm a "clueless academic", am I? by Omnifarious · · Score: 2

      You are an idiot, masquerading as a programmer. If you wish to flame a clueless academic, you should at least make sure you have the wit to do so intelligently.

      The const problem is a real problem. I like to be able to say that the method I'm passing an object to promises not to modify the contents of that object. Your mention of 'static' is totally irrelevant in this context. And the author clearly understands 'final' which is why he says there's no real analog to C++s 'const' methods.

      Your 'finalize' method example provides absolutely no guarantee about when it will be called. You may run out of file descriptors, or whatever other resource you're using before the GC is run. The GC only deals with memory, so it won't run when you run out of file decsriptors to save you from stupid, needless errors when you open files.

      The real answer to his 'no destructor' argument is the 'finally' clause of a try ... catch block, which is just as bad as having to remember to 'delete' things in C++.

      As for the reference vs. value semantics of objects vs. primitive types, Java obscures the issue. It's easily as bad as the fuzzy distinction between arrays and pointers in C.

      C++ container classes that contain by value do a good job of making it a bit of a pain (and sometimes impossible) to get a pointer to the value they're actually holding. Java, cannot make this a pain.

      I personally, would shoot anybody who used 'instanceof' in an OO program in a statically typed language. That just screams 'bad design'. Templates are a far better means of achieving genericity than run-time type checked casting.

    8. Re:So I'm a "clueless academic", am I? by Omnifarious · · Score: 2

      While I agree that the interface idea is an excellent idea, I found, on occasion, that I want mixin interfaces that actually have code and data behind them.

      In particular, I have a reference counting class that has a reference count in it. Several classes I have multiply inherit from the reference counting class, and a different data containing class, and this works out well.

      This couldn't be done in Java. Of course, Java wouldn't need a reference counting class, but the principle is the same.

    9. Re:So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

      > This late entry, combined with the goal of
      > preserving its C forbearer, has led to
      > inconsistent use of exceptions in C++ libraries.

      Sounds like you're not up to date on the ANSI/ISO
      C++ Standard (finalized in 1998). Exceptions
      are consistently used throughout the standard
      library.

      > You also miss the boat somewhat on the const
      > keyword.

      As your comments show below, it looks like you still don't understand what const is all about.

      > While not as syntactically convenient
      > as const, Java interfaces can be used to
      > provided mutable and immutable interfaces to
      > your classes. This does, IMHO, a better
      > job of separating the const methods from the
      > non-const ones.

      The point is that once you declare a method const, the compiler will make sure that the method body doesn't modify the object state somehow. Java has nothing like this safety check. Java seems to be big on performance-draining runtime error-checking, but weak on performance-neutral compile-time error-checking. And what's so superior about having to go to all the trouble of defining two separate interfaces to a class? This is enough work that it will deter a lot of programmers from bothering with it. The JCL itself doesn't do it. In comparison, sticking the keyword "const" at the end of a method declarations is trivially easy.

      > The clean separation of inheritance of
      > interface from inheritance of implementation in
      > Java is way ahead of the C++ inheritance model
      > where the two are muddled.

      Sorry, but they're muddled in Java too, as you can use "extends" for both interface inheritance and implementation inheritance. In C++, public inheritance should really only be used for interface inheritance, and private inheritance for implementation inheritance.

      > the freedom from memory leaks

      This is a red herring from the early days when C++ lacked adequate libraries. Nowadays by using smart pointers, the standard container classes, and perhaps a few of your own container classes, memory leaks aren't a problem anymore, because you never deal with "bare" pointers.

    10. Re:So I'm a "clueless academic", am I? by Kevin+S.+Van+Horn · · Score: 1

      >> That's the beauty of real, honest-to-God
      >> destructors: they get called automatically.
      >
      > Yep. And they work really well when you don't
      > pass the object by reference and the
      > deconstructor gets called with the stack
      > cleanup. (Sucks, trust me. :-))

      I'm not sure what you're talking about here, but I'm guessing that you're referring to what happens if you pass an rvalue (temporary object) to a function that takes a const reference parameter and assumes that this reference will continue to be valid after the function returns. If so, you're out of date. The ANSI/ISO standard redefined the lifetime of temporaries to take care of this.

  51. Re:You've Confused and Saddened Us All by pivo · · Score: 1

    Yes, references in Java are a lot like pointers in C/C++. The thing is, it's not too useful to think in these terms because all object references are passed by value.

  52. Re:Is anyone or any business really gonna back C# by blue+trane · · Score: 1

    right on! I agree with most everything this dude said

  53. Re:It's all about the portable libraries by Simon+Brooke · · Score: 3
    I think you're underplaying the performance problems of Java. I've been using some XML libraries, and was absolutely shocked by the bad performance. In this application at least, Java is at least 10-100 times slower than C++ code.

    Bad Java is slower than good C. Good Java is faster than bad C. In actual comparative benchmarking, Java is faster than C in two of the three tests done. I'm not aware of any recent benchmarking which has come to the opposite conclusion. If your Java is slower than your C, that's your coding, not Java.

    The JVM is not a millstone; on the contrary it is extraordinary powerful technology. JITs are better, of course. But static native compilation is not only not necessary, in real testing it confers no benefit.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
  54. Re:You've Confused and Saddened Us All by flumps · · Score: 1

    Just out of pure interest you aught to read this comparison of different languages

    Ps, the stooopid mistake that guy made with the by reference and by value mix up just goes to show there are people who know squat out there. God save us all.

    ~matt~
    0
    o
    .
    ><>

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  55. LinuxOne connection? by RelliK · · Score: 1

    Is this language made by the same people who started LinuxOne?
    ___

    --
    ___
    If you think big enough, you'll never have to do it.
  56. Re:Why a new VM? by Pink+Daisy · · Score: 1

    It could be done, but it isn't a simple problem. The two languages support a few fundamentally different features that would be difficult to make work together. Garbage collection (Java) and multiple inheritance (C++) come immediately to mind. I don't know Eiffel or Ada, but I'm guessing that they both have a limited ability to manipulate pointers directly, because that's another difficult thing to do with Java bytecode. Anyway, kudos to whoever does it; it would be a very useful thing to have.

    --

    If you are modding me down because you disagree with me, use the "Flamebait" category, not the "Troll" one.
  57. Re:It's all about the portable libraries by bockman · · Score: 1
    Yes, C++ is very powerful. But it also awfully easy to shot your foot with. Java took away some of the power, putting it some more discipline. One example are templates. One other examples are multiple inheritance vs interface.

    In my job, which currently involves both C++ and Java, I don't miss much what Java took away from C++. I don't miss much templates : generic programming can be carried out with well-conceived interface classes : it is less easy and you have to write more code, but it is also IMO more readable than templates, and more safe. And last time I used templates (admittedly, 1 year ago ), I was annoyed by the fact that most errors only shown up when I instantiated a template.

    Not that I like everithing of Java, and that I wouldn't like some more feature. And not that I dislike all of C++. It is just that in my expierience the compromise 'power vs easiness' made by Java is more appealing that the one made by C++.

    --
    Ciao

    ----

    FB

  58. This is great by nebular · · Score: 1

    If the author can get some sound finacial backing, this could very well do what everyone predicted Java would do. Which is making the choice of software by Operating system, all but over.

    But even further is that when software is released it's available for all platforms, not just one.

    Java was supposed to do that, and it could have, but for the various reasons it didn't.

    This project has it where Java doesn't, it's not a new language, it's pure C/C++, which means it has a much better chance of being accepted and used, but only if they get the backing.

    I hope they do. It could start a trend with all the other languages we know and love having a Internet sibling

  59. Re:Why not standardize the BYTECODE? (BEEN DONE!) by theviper007 · · Score: 1

    Actually, there is already a processor design to do just that by (who else?) Sun. The processor is called MAJC (Microprocessor Architecture for Java Computing):

    http://www.sun.com/microelectronics/MAJC/

  60. Re:OK. Name one app written in VB. by JamesOfTheDesert · · Score: 1

    So, let's see ... any langauge that requires the pre-existence of some OS feature isn't a real language, by the implied tautology. That seems to rule out everything but machine code.

    --

    Java is the blue pill
    Choose the red pill
  61. Re:It's all about the portable libraries by hugg · · Score: 1

    I don't think Java's problem is so much execution speed now that we have HotSpot -- it's the *lack* of libraries. Apps are getting much more connected to different APIs, and with Java you have to make a JNI wrapper for each API you want to support. The world speaks in C, C++ and COM, unfortunately. Of course, Java has other problems, like Sun...

    I digress.. this guy says his VM has a speed advantage without needing a JIT?! A speed advantage over what ... Applesoft?! Yeah, game developers will flock to this platform...

    So what's the point of portability nowadays anyway? Seriously? Commercial software will be developed for Windows, open-source software will be eventually ported to Linux no matter what platform it starts on, and Mac users will ... complain about cracks in their cube. Anyway, the format of the binary code is inconsequential... the libraries, as you say, are the thing. And things like OpenGL drivers are notoriously dissimilar across platforms, so there goes yer portability.

    I too have a vision of a big box with a funnel on top, and I just throw in any number of different CPUs when I want to add horsepower. But thanks to our current chip & OS monopoly, we have no economic need for such a device.

  62. Re:Why not standardize the BYTECODE? by WeiszNet · · Score: 1
    Well, not exactly. Eiffel# offers some features that C# does not - and those are reason enough to use it. You get true genericity, not only that fake array genericty. And you get Design by Contract.

    And if you follow ISE's announcements, you will find out that they are working hard to get more and more of Eiffel into Eiffel #.

    In the light of that C# only looks like a crippled Eiffel# to me (;

  63. Re:Java's problems are not limited to performance by Anonymous Coward · · Score: 1

    Python is an interpreted language.

    The reason there is so much noise about Java, python et al is because there is a glut of 3rd rate programmers with trade school diplomas that are too fucking stupid to understand a real language like C++. That's fine. Most software being written today (and yesterday and tomorrow, for that matter) is suitable for data processing programmers. You're all COBOL monkees or UNIX admins remade.

    Java is a nice language. Python is a nice language. Perl is a nice language. But no one is writing commercial grade shrink wrap software in those languages.

  64. RTL + JIT? (was Re:RTL as bytecode standard?) by Simon+Brooke · · Score: 2

    RTL is the intermediate representation that GCC uses. The different front-ends for GCC (C, C++, Objective C, Fortran, and Pascal, I think) all compile into RTL, and then on that level optimizations are done and ultimately binaries created.

    Now, as bytecodes, RTL would probably be very slow. It seems (to my most uninformed eye) to be very low-level: appropriate for compiling, but not for interpreting. But if you can make the entire compiling process robust, there's no reason that compiling should make something less portable, as long as you are willing to replace non-conformant OS-level code with your own (standardized) code. Lo and behold, such code even exists! GNU has been writing just this distributable code for a long time.

    Actually, if combined with 'Just In Time' native code compilers, or Transmeta-like code-morphers, this sounds like an exceedingly good idea. Furthermore, the native-compilation elements of those JITs and morphers already exist for a wide range of processors, because they're part of GCC. So all that's actually needed (if it doesn't currently exist) is an RTL virtual machine and code-profiler. That way you could have a long step towards 'compile once in any language and run anywhere' fairly cheaply.

    It has to be recognised, though, that part of 'run anywhere' (and part that Java has actually provided fairly well) is universally available libraries. For this to really fly you'd need something equivalent to the Abstract Window Toolkit (the Java UI toolkit which maps UI requests to functions of the native GUI of the OS it's running under, not Swing which invents a whole new GUI different from every other).

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
  65. Re:This is great... by JabberWokky · · Score: 2
    Bjarne has already gone on record as thinking he doesn't think C++ has any (significant) problems.

    You have been reading different interviews than I. He's one of the biggest C++ nitpickers out there (makes sense... he knows it best). His biggest gripes are that they rolled out with incomplete templates definitions and standard libraries. He can easily name a dozen more problems in light interviews.

    Generally, however, he does justify each decision, even if the explation is just "It Seemed Like a Good Idea at the Time" or "We Didn't Have Time to Do Better".

    One thing he dislikes is how C++ handles strings... CUJ, DDJ or some other print magazine ran an entire article about it, including some nice hindsight ideas.

    --
    Evan

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  66. actually you do not have to port your code by Justin+Goldberg · · Score: 1

    This is not a new language. Internet C++ is a misnomer. This is a virtual machine for C and C++ that links to the GNU C library. Think of it as a c/c++ interpreter.

  67. Re:It's all about the portable libraries by Reality+Master+101 · · Score: 2

    Xerces is what I'm playing with, using Sun's Forte under Linux. Parsing an 4K XML file (with empty SAX callbacks) took 117ms on my P/II 266 machine. Does anyone here think they couldn't write an XML parser that would parse a 4K file in under 5ms in C++? Or perhaps even 1ms?

    I don't even think I could write a C++ program that took 117ms.

    Incidently, that 117ms was after executing the parser once to make sure everything was loaded (the first time took about 1.5sec!!!)


    --

    --
    Sometimes it's best to just let stupid people be stupid.
  68. Re:Why not standardize the BYTECODE? by maraist · · Score: 2

    Why not develop the bytecode specification as the point of compatibility? A feature rich "meta-assembly" with all the basic operations, plus a widget toolkit interface, network interface, etc. Provide a specification to the API in a generic, language NON-specific form and provide a reference implementation in a language of choice (Java, C++, C#, Prolog, whatever). Write a compiler backend for gcc and you get a shirtload of language interfaces in one hit.


    That's a great idea!! All you have to do provide libraries higher up - those common and compatible with gcc, at least for a platform. You could have what-ever optimizations you want for all the sorts of complex tasks that a given language wants to use, like reg-ex, GUI's.. Each could be in their own libraries (since they're called differently).

    Oh wait.. We already have that.. It's called assembly.

    -Michael
    --
    -Michael
  69. Re:Why not standardize the BYTECODE? by Matt+Gleeson · · Score: 1

    Looking at the industry, it appears that there already is a standard "bytecode" that almost every platform can run:

    x86 code.

  70. Re:Why not standardize the BYTECODE? by maraist · · Score: 2

    There are a couple issues that this brings up (that I can imagine).

    1) Different languages make different assumptions. These range from calling methods to memory management, to threadibility, to the dynamic nature of the code (self-modifying code). It would be difficult to write a catch-all sub-system for any appretiable number of languages.

    Now MS managed to use a JIT to translate both java and C# into the same byte-code, but they had the benifit of designing the second language to be compatible.

    2) Dynamic languages are hard to compile into assembly. The most you can do is compile the main event loop with a static list of byte-codes.

    3) You do NOT want to do anything that would make C slower. Namely, you're not going to use a generic interpreter that reads byte-codes, and based on the language context, treats them differently (i.e. reads the C-derived assembly, and interpret it). You're also not going to translate C-derived .o files into a meta-language byte-code (that isnt' assembly). So unless the common byte-code IS assembly, you're back at step 2.

    So, essentially we can't have executable code that is common to all egcs-parsable languages. What you might be able to do is unify a couple high-level varients like Java, C# and Internet C++, which to me, on the outside, seem identical in nature. This wouldn't really work for Python / Perl / Scheme. They still need full-blown interpreters because their code changes over time (through the use of "eval"). But maybe we'll be biggots and say that they don't deserve coverage in this universal optimizer.

    But here's what you get out of this. You have 3 or more languages that use the exact same byte-code underneath. They all have their plusses and minuses, but you have complete interpolability. But this "family" of languages is distinguished from raw C / C++ and purely open sourced Perl / Python / Scheme ,etc. I seperate the last category because unless you take special steps, the interpreter reads from the raw source code. (Yes, Python and Scheme can be compiled, but they're really just token representations).

    My point is that you haven't solved the programming crisis, you've simply identified families of similar architecture and unified them.

    -Michael

    --
    -Michael
  71. ECMA is a standards body. by yerricde · · Score: 2

    ANSI and ISO are standards bodies. So is ECMA. ECMA may be better known for standardizing the language formerly known as Java(TM)Script into EcmaScript.

    --
    Will I retire or break 10K?
  72. STL is not an abomination by horse · · Score: 2

    >Collections/containers/algorithms that aren't the abomination that is STL.

    The STL is one of the more elegant and useful collection libraries I've seen in years. It makes the Java collections look amaturish.

    One of the real weaknesses of Java currently is its lack of support for generic programming. (Another is the fact that while Swing is nice and portable, it's slow.)

  73. Let go of the C myths by Simon+Brooke · · Score: 3
    It really is time to let go of the C myths. There are two which really get to me:
    • C is faster than higher level languages.
      • This hasn't been true since the mid-eighties at least, when repeated actual tests showed that the best LISP compilers produced faster, tighter code than the best C compilers.
      • More recently the myth is that C is faster than Java, usually justified by people who include the startup overhead of the JVM in their Java timings. In fact, careful benchmarking shows that with the best current JITs, Java performs as well as the best C compilers at most tasks, and better at some.
    • C is somehow uniquely good for writing operating systems. This view is based on the fact that UN*X was written in C, and UN*X actually is a rather good operating system; and because BSD was available with source early on, UN*X has typically been used as the example when teaching OS design. But operating systems can be written in a wide number of languages. A number of the operating systems I've used over the years have been written in LISP (a good language for the purpose), a number in BCPL (not something I'd recommend) and two (UN*X and Linux) in C.

    C is a language which is extremely good for creating hard to trace bugs - memory leaks, data corruption and so on - and extremely poor for programmer productivity.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
    1. Re:Let go of the C myths by elronxenu · · Score: 1
      C is a language which is extremely good for creating hard to trace bugs - memory leaks, data corruption and so on - and extremely poor for programmer productivity.
      Quite true. I've written quite a lot of C, C++ and Perl (and other languages irrelevant to this discussion). I have found perl to be much faster to write, its object model far cleaner than C++, its modules actually usable, and its execution time has never been a problem. Perl has several dodgy language features and I don't use those. Effortless polymorphism, no anal requirement for full declaration, strings and hashes as part of the language core, inbuilt substitution and comparison operators and runtime garbage collection all give perl the edge over C++.

      If I was writing a 50,000 line single-process application with a GUI, I'd probably do it in Java. But for anything smaller, and without any strong speed constraints, it's really going to be much faster to write, and probably less buggy, when written in perl.

  74. Re:It's all about the portable libraries by sklib · · Score: 1

    the big strength of java is not only in its large set of libraries. The real power of java is that it's got C++-like syntax but with garbage collection. Never having to worry about memory deallocation is a big deal and it helps in rapid application development.

    --
    -S
  75. Why RTL can't be a bytecode standard by yerricde · · Score: 2

    Unless the RTL uses a stack for registers (like Java(TM) bytecode does), the different number of registers on different architectures will trip you up when you try to run the RTL through a code generator.

    --
    Will I retire or break 10K?
  76. Re:honest question by gle · · Score: 1

    That must have been a typo. He meant MFC I guess.

    ____________________

    --
    Ni!
  77. Re:Why not standardize the BYTECODE? by iseletsk · · Score: 1

    I think that Internt C++ is not about byte code. It is more like WINE for running win32 on linux. Otherwise they would see the same problems with performance that Java sees. Also, java compiled with TowerJ gives incredible performance, easily comparable with optimized C++.

  78. Wow. what a bad idea. by cparisi · · Score: 1

    Looks just as hard to maintain and unreadable as regular C++. Great!

  79. Re:Why not standardize the BYTECODE? by hugg · · Score: 1

    There's no such thing as universal bytecode. Every system is a set of compromises. For instance, the Java bytecode system involves things like identifier scoping, integer sizes, FP formats, package scoping, exception handling, etc. Smart it up and you've got something impossibly complex. Dumb it down and you've got, well, a RISC instruction set.

    Also, not every language would translate to a bytecode format... a language where data = code, like LISP, would be very unhappy trapped in bytecode.

    And don't tell me about standard libraries ... we can make a reasonably full-featured socket library, sure ... but everyone wants their own tweaked widget library, that's why there's 1,000 different ones out there.

    We still can't agree on how big an integer should be -- don't expect a universal instruction set anytime soon :)

  80. Re:good in a way, bad in a way by |deity| · · Score: 2
    WTF???? C/C++ are worth the headache. What you lose in ease of use you gain in power and speed. Try programming an operating system in anything besides C or a derivative. It's not going to happen unless your willing to handcode assembly language. And you've obviously not tried that or you would be praising the simplicity and ease of use that is the C programming language.

    Very high level languages have their places. But until computers are many times faster then they are now we will need low level languages. Todays machines are *very* fast compared to the machines of only a few years ago but their are still things that are to processor intensive to do in high level languages.

    Because the newest and highest tech software always pushes the limits of what a computer can do people will continue to use low level languages to do those types of programs in.

    BTW I do realise that C is/was considered a high level langauge but compared to most languages in use today it is very low level.

    So if all you ever want to do is to make a few applets or a text editor the use java, but if you ever want to do something like virtual reality, or program for a 3d display were instead of dealing with 1024X860 pixels in 32 bits of color your dealing with 1024X1024X1024 voxels in 32 bits of color, you'll need C/C++. (now that was a run on sentence.;) )

    --
    Environmentalists are their own worst enemy. ~tricklenews.com
  81. Re:Why not standardize the BYTECODE? by kakibesar · · Score: 1

    Isn't this what the .NET initiative by Microsoft is trying to do?

  82. Re:Why a new VM? by Kmon · · Score: 1

    Well, I have a grasp of Eiffel, and as I understand, the first versions of Eiffel didn't compile to byte code (and most still don't). Eiffel compiled to C++ code, then used gcc or another C++ compiler to compile into native binaries. The C++ code that was compiled from Eiffel did have automatic garbage collection built in as a result of being generated. As long as you aren't too concerned with "tweaking" things to make them very efficient (or efficient at all ;). Eiffel's solution was inelegant, but functional. Lately, small-eiffel has added byte code support (but continues to have multiple inheritance). So I guess this begs the question: We have STL, we can build standard C++ libraries for a windowing toolkit that will run across platforms (QT and GTK are two solutions that spring to mind), why don't we use a standardized, portable C++ as the spec to compile to when building these new ultra-high level languages? With a little bit of work, it wouldn't be too hard to make the C++ step of the compilations utterly transparent. For that matter, it wouldn't be much of a technical hurdle to build a Java -> C++ -> Native Code compiler as a way to test the viability of this concept. Either way, I don't think building a new VM is the solution. Give me the Java VM or no VM at all!

    --
    Gah
  83. Re:Lisp. by Loundry · · Score: 1

    Better? In what way? You'll probably say, "Lisp is elegant, beautiful, and advanced."

    But you won't say, "Lisp is useful."

    --
    I don't make the rules. I just make fun of them.
  84. Write once Run Anywhere ... by SuperDuG · · Score: 2
    Anyone else notice that unless it's a *ix/ux enviroment that this isn't a language for you ...

    Being interested in C++ programming myself I decided to see if maybe I couldn't compile a binary using Cygwin ... I was wrong :-)

    So anyone else interested in maybe helping to make a port of this "universal" language for say ... windows/mac/be/qnx(haven't tried compiling under qnx yet) ???

    --
    Ignore the "p2p is theft" trolls, they're just uninformed
    1. Re:Write once Run Anywhere ... by SuperDuG · · Score: 2

      mind sending over the ports then?

      --
      Ignore the "p2p is theft" trolls, they're just uninformed
  85. Re:Lisp. by NecroPuppy · · Score: 1

    Lisp kills brain cells.

    It's one of the few langauges you can walk away from to get a soda, come back, and have no idea what you were doing... :)

    --
    I like you, Stuart. You're not like everyone else, here, at Slashdot.
  86. A 13 MB source file? by rlk · · Score: 2

    And a 1.8 MB .h file:

    $ ls -l
    total 15758
    ...
    -rw-r--r-- 1 rlk bin 1835540 Sep 22 08:31 icvmjunk.h
    ...
    -rw-r--r-- 1 rlk bin 13958826 Sep 23 21:42 icvmsup.c
    ...

    There are about 25 files total. What's more, that big .c file is actually remarkably, er, compact, in that all of the actual code is macros. I tend to actually rather like macros more than is considered healthy in C (much less C++, but there are things that templates just can't do, or at least couldn't a few years ago), and I'm a big fan of metaprogramming, but this is seriously over the top even by my standards.

  87. Re:You've Confused and Saddened Us All by Acy+James+Stapp · · Score: 1

    Actually, "Standard C++" has three of the above. MSVC does not support return type covariance or design by contract.

    --
    -- Too lazy to get a lower UID.
  88. Re:good in a way, bad in a way by StormyMonday · · Score: 1

    Try programming an operating system in anything besides C or a derivative. It's not going to happen unless your willing to handcode assembly language.

    Try Oberon. C isn't the only game in town. Usable, commercial OSs have been written in all sorts of strange languages, including LISP, PL/1, and ALGOL68.

    I'm willing to put up with C's funky syntax and radical lack of safety when I am working "on the metal" or when I need the absolute maximum speed. Any other time, it's a pain in the arse.

    Also, the number of applications that really need the speed is a *lot* smaller than most people think. I've seen major programming efforts for things like Web applications burn a vast amount of programmer time doing CGI scripts in C/C++ instead of Perl because "it has to be fast". Difference to the user turns out to be unmeasurable, due to Net and database delays.

    --
    Welcome to the Turing Tarpit, where everything is possible but nothing interesting is easy.
  89. Re:good in a way, bad in a way by Lx · · Score: 1

    I looked at Ruby as well, but I have to admit, one of the things I like about Python is the fact that it comes with tons of really usefull modules in the default install. I'm sure I'm going to learn Ruby eventually, but for now I want to finish learning Python well. By the way, why is it no one ever writes compilers for these languages? Unless I'm mistaken, there's no reason you couldn't...

    -lx

  90. *gasp* a NEW language? by krystal_blade · · Score: 5
    Slashdot 2003:

    Tom Goldfunk announced today the release of the brand shiny new Super Duper Does it all, can cut a can in half, and still not make mush out of a tomato, Ginsu ++ language. This new revolutionary language, though completely the same as other languages, touts the unique ability to "Do the same thing all those other languages do, plus some more cool stuff." Of course, backwards compatibility is shaky, so most applications that run fine in C++ will have to be re-written in Ginsu++, but that's not really a problem, is it?

    During his press release, Tom stated that "Ginsu++ is going to revolutionize the way we look at computers. A language that is useable across the spectrum of computers has really been lacking in the past millenium. This will change the way programmers work, since they'll now have to learn a new language on top of the ones they already know. And, to make it more intriguing, we've changed the way the language looks to one of those funky top to bottom "MATRIX" style readouts, which breathes new hope into those die hard monochromatic monitor folks in Zimbabwe."

    Tim Goldfunk also used the public release of Ginsu++ to tout his company's next project, SuperGinsu+infinity, due out next summer. "That one," Tom promised, "Is going to rock!!"

    Oh, I'm sorry... I forgot the Irony tabs...

    krystal_blade

    --
    It will be easy to motivate our fellow man; there is hardly anything people treasure more than not being annihilated.
  91. Re:Why not standardize the BYTECODE? by jonathanclark · · Score: 2

    You mean like x86? Sure it's not ideal, but how much more standardized can you get?

  92. Not really open by EvilGwyn · · Score: 3

    Sice most of the code is in a difficult to understand file with over 200000 lines, how can it be consdered open?

    --
    Phear my l33t homepage.
  93. Re:It's all about the portable libraries by AtrN · · Score: 1

    Now we're calling a stack machine simulator "technology". Boy, that's pushing things.

  94. Re:Is anyone or any business really gonna back C# by hey! · · Score: 2

    Is anyone or any business really gonna back C# ?

    Well, why do businesses take to VB? Because a lot of what they need to do is to bolt together pieces of logic.

    Nobody gives a shit about C# as a language. It's the virtual machine that it runs on that is important. There is a shortage of capable programmers, and believe it or not the clueless code grinders businesses have to use still can't get their brains around using COM. MS is targeting the right problem in its usual half-assed way.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  95. What I like about Java and where I hope it goes. by leereyno · · Score: 3

    Complete source compatibility is almost as elusive as the "philosopher's stone" which alchemists believed would turn base metals into gold.

    Java gets around this problem by creating a binary compatibility standard. But this introduces one very major problem, speed. Java might be a programmer's dream come true architecture wise, but it is a user's nightmare speed wise. The nice thing is that the difference between a targeted compiler and a virtual machine is pretty small. I'd like to see more true compilers for java so that we can do away with pesky virtual machines that just make the program less efficient. Unlike other languages, targeted compilers for java would still have to support the entire language in order to maintain compatibility. Once we see this, I think java will become a viable choice for real programming.

    Lee Reynolds

    --
    Muslim community leaders warn of backlash from tomorrow morning's terrorist attack.
  96. Re:Why not standardize the BYTECODE? by AtrN · · Score: 2

    It's been attempted. Look for UNCOL and then look for ANDF and then download the Tendra C compiler and go for it.

  97. Yup, this is coming soon. by Aardappel · · Score: 2

    In the form of the new Amiga. It uses Tao's Elate technology, which is exactly what you ask for: a portable cpu/assembly abstraction, with no more language bias than any other cpu (i.e. C mostly) coupled with a nice lightweight OS providing all common functionality. Comes with a very clean assembler, gcc, and a very fast Java JIT. It has already been ported to god knows how many architectures and is (albeit a bit "raw") available now.

  98. Re:Why not standardize the BYTECODE? by esper · · Score: 1
    My impression of the earlier comment was that their understanding of the .NET presentation was along the lines of "if you can't do it in C#, you can't do it in .NET". As an example, he suggested that, even though Eiffel supports multiple inheritance, a theoretical Eiffel# would omit that feature because C# doesn't support MI.

    This is, however, just my interpretation of the original comment. I have no idea whether it has any connection to reality, as I don't know anything of substance about C# or .NET beyond the basic concept.

  99. Mac OS X by frontallobotomyboy · · Score: 1

    I actually got it to complie (sort of) on Mac OS X, only 60 build errors, most of them because of header issues. I'll keep working....

    --
    Damn sheep....
    1. Re:Mac OS X by imac.usr · · Score: 2

      First off, you're a sick monkey. Keep it up.

      Second, this means Mac OS X supports development in C, C++, Objective C, Java, and soon Internet C++, while C# might be ported just to keep the antitrust types at bay. That's a lot of C, especially for an OS whose headers still feature the pascal keyword in places. Mmmm, irony.

      --
      I use Macs for work, Linux for education, and Windows for cardplaying.
  100. Re:Speed Question? by jilles · · Score: 3

    check out HP's experiment where they emulated a processor using dynamic compilation. It turned out that the emulation was about 25% faster than the real thing.

    Dynamic compilation is the future, now we just need a good portable, free, open, bytecode spec to which we can conform.

    --

    Jilles
  101. Re:Java's problems are not limited to performance by schellhammer · · Score: 1
    ... they aren't indeed. Verbosity is only one of the other problems. At least two more things come to my mind that make C++ more comfortable than Java:
    • Header files. It's very hard to have an overview of what a Java class can do, since there's no list of methods. I prefer the separation of head and code like in C++.
    • Java classes can only extend one superclass. If you happen to have a whole hierarchy of classes, and only one of the most specialised is to be an 'Observable' as well - bad luck. You'll have to put java.lang.Observable at the root of the hierarchy, or build your own interface.
    --
    'final' means 'the last', not 'the latest'...
  102. Re:It's all about the portable libraries by Anonymous Coward · · Score: 1

    I know X and opengl are not problems for the windows platform and opengl not a problem for the mac platform, but any other platform then those they could use software opengl or mesa3d. OpenGL should be ONE of the most portable graphics APIs available, so I don't think its much of a problem. Xlib and Motif is probably not as portable, but I know they are on a number of ports like windows.

  103. Mozart's VM is What's Needed by Baldrson · · Score: 2
    Turn Mozart's virtual machine into a plugin and you'll have the basis for something that is compellingly better than the pack of Java-like languages.

    Ultra light weight threads are one of the major advantages of the MVM, but another advantage is how well thought out and integrated with the other language features is it's thread synchronization scheme.

  104. Re:It's all about the portable libraries by Jordy · · Score: 2

    In fact, it seems to me that Java's biggest weakness is execution speed. It has everything else going for it. Type safe. No unhecked runtime errors. RTTI. Garbage collection. Portable object code. And on and on. Given Moore's Law, it seems that Java, or a language like it is destined to become a widely used language.

    The reason I like C++ more than Java is very simple. There are a lot of annoying (and wonderful) features in C++ and if I don't want to use them I don't have to.

    An optional garbage collection type modifier would be a great thing to have for very isolated situations where for some unknown reason, you can't keep track of your own dynamic memory usage. Garbage collection is not a cheap operation and can lead to nasty performance and memory overhead in certain types of applications. Forcing it upon the programmer is wrong.

    An optional thread locking type modifier would be the ultimate godsend so one could not have to worry about sticking mutexes all over the place in applications that contain large amounts of shared data.

    And finally, an optional compiler flag which asked it to print out warnings when there are exceptions that haven't been caught.

    The reason C++ is the most popular language is simple, it allows the programmer to work with the features they are comfortable with in a flexible manner. You can work with with straight assembly, straight C, or use any combination of the features C++ gives you. Granted, having backwards compatibility with the massive amount of C code out there probably had just as much to do with it, but... :)

    Of course, that's just my opinion, I could be wrong.

    --
    The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
  105. Re:It's all about the portable libraries by lient · · Score: 1
    There are so many more problems with Java than just performance (although that is a big one) that I don't even know where to begin. Should I make an
      ?
      1. Speed (yes, those JIT's still suck)
      2. No multiple inheritance
        People make the argument that multiple inheritance is "too complicated" and "confusing". I think this is a cop out and lack of experience with a good thing should not be validation that it is not a nice feature. When I try to use interfaces as the alternative it seems really hackish. I want this to be a Thread. Ooops. Sorry. I already have a superclass. Make it Runnable and construct a Thread with it... (ugh)
      3. Templates
        You think you can make more generic, flexible libraries with Java? Think again. Templates can do so much more and with TYPE SAFETY! It is too great for words. Just count how many times you have to cast in Java. This is a major design flaw.
      4. Every other cool feature Java thought was too hard to use
        Operator overloading, default parameters,... This kind of stuff just makes me get warm fuzzies inside. While not strictly necessary, it makes for better looking, cleaner code.
      5. It doesn't have STL
        STL is so much more a a superior library than the java.util Collections stuff it's not even funny. Java Iterators do one thing and only one. Go through the elements in a forward direction. STL iterators do so much more, and you don't even have to care if your using a pointer or a class to do it!

        I could go on and on, but I've got work to do. Why don't you get your information straight before you start saying how much Java is better.

  106. Language Bloat by empesey · · Score: 2

    Just how many dialets of C++ are they going to create? The more dialets out there, the less portable this language is going to become. Sure there are shared libraries, and all, but why do we need yet another C language?

    1. Re:Language Bloat by krystal_blade · · Score: 3
      Underground Slashdot Report: Tom Goldfunk held a press release 2 minutes ago detailing a plan to completely dialect out the entire C library. In his hastily prepared speech, he stated that "due to public concern over the ELITISM of programmers, the C language will now be written with the following dialects, so people from all walks of life will benefit." Planned releases of so called DC++ packages are as follows.

      Ebonics C++ phat style

      Redneck C++ with side order of pork rinds

      Pygmy C++ (version has audio tape of clicking sounds)

      C++ for Siberian Huskies

      Oriental C++ with side order of Siberian Husky C++

      Australian Outback C++ complete with the "This makes the deadly computer FURIOUS ANGRY" dude VHS tape.

      Ex-Commune Hippy and now wants to make money C++

      Government Lingo C++

      C++ Mexico version with forged documents for border crossings

      Homeless persons C++ in a big brown box

      The above versions are scheduled to be released by January of this year, with more to follow dependent on the successful sales of at least one copy of the above versions.

      krystal_blade

      --
      It will be easy to motivate our fellow man; there is hardly anything people treasure more than not being annihilated.
    2. Re:Language Bloat by Anonymous Coward · · Score: 1

      I pity the guy who has to write "Garbage Collection for Siberian Husky C++"....

  107. Re:I just got back from OOPSLA by AtrN · · Score: 1

    Throw in something that does CSP-style concurrency. Occam, Limbo or Alef.

  108. It's all about the portable libraries by DickBreath · · Score: 5

    As I see it, the big strength of Java is it's huge set of portable libraries. A portable and well designed framework for building GUI's.

    The strength of a language (besides the fact that it has to not suck to begin with) is that language's standard lowest-common-denominator libraries.

    If you've ever had to build a GUI in C/C++, you know it is not portable. You can write a front-end to your application in several different frameworks -- or try to work with a lowest common denominator framework that runs on your platforms of choice.

    Java not only solves this problem, but does it nicely. Pluggable look and feel's. A well designed framework -- better than some of the other frameworks I've used.

    But not only a portable GUI toolkit, but portable everything else with it. e.g. Collections/containers/algorithms that aren't the abomination that is STL.

    In fact, it seems to me that Java's biggest weakness is execution speed. It has everything else going for it. Type safe. No unhecked runtime errors. RTTI. Garbage collection. Portable object code. And on and on. Given Moore's Law, it seems that Java, or a language like it is destined to become a widely used language.

    Can Internet C++ (or C# for that matter) really already have the huge investment that Sun has made in Java? In fact, I find it ironic that Internet C++ and C# seem to be becomming more like Java than Java is like C++.

    Or maybe I'm trying to ask, what does it really bring to the table that I don't already have? (Besides being the C++ language which might be useful if I have a huge investment in C++ code.)

    The article talks about lots of standard libraries, POSIX, MOTIF, X, etc. This doesn't give me portability. It means I can only run on platforms with those capabilities. (If I read it correctly.) Or do they mean that they are going to bring X, OpenGL, etc. to everywhere. Now that would be cool. And a huge task.

    --

    I'll see your senator, and I'll raise you two judges.
    1. Re:It's all about the portable libraries by Zagadka · · Score: 1

      If Java could be natively compiled...

      You might be interested in this page.

    2. Re:It's all about the portable libraries by Arandir · · Score: 2

      If you've ever had to build a GUI in C/C++, you know it is not portable.

      A GUI interface should not be a part of a programming language, any more than a GUI shell should be a part of an operating system. That's what libraries are for. Should there be GUI standards? Of course! But that's not the point. The machines themselves don't have standard GUIs, so why should a their translators have them?

      Java not only solves this problem, but does it nicely. Pluggable look and feel's. A well designed framework -- better than some of the other frameworks I've used.

      'Tis true! If your only concern is portability, then Java (or C console) is the way to go. But there are other concerns for other people.

      But not only a portable GUI toolkit, but portable everything else with it. e.g. Collections/containers/algorithms that aren't the abomination that is STL.

      The STL is hardly an abomination. Perhaps you haven't grokked it yet. It is a completely different paradigm than functional or object oriented programming. It's *generic* programming instead. But even if you stick to the tried and true OO paradigm, the STL is till simple, robust and fast.

      It has everything else going for it. Type safe. No unhecked runtime errors. RTTI. Garbage collection.

      RTTI should not be counted as a major benefit. In all languages that have it, including Java, it's a hack to get around encapsulation. There are sometimes instances where you need it, but always keep it in the bottom of your toolbox under lock and key.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    3. Re:It's all about the portable libraries by bakreule · · Score: 1
      In actual comparative benchmarking, Java is faster than C in two of the three tests done. I'm not aware of any recent benchmarking which has come to the opposite conclusion. If your Java is slower than your C, that's your coding, not Java.

      What are you talking about? I looked at the link and there are two out of three tests where C flat out beats Java in speed. The third has Java and C trading off as the array size gets higher, but the average speed of C is higher than Java in this case. What do you mean, two out of three tests?

      Trains stop at a train station. Buses stop at a bus station.

      --

      Buses stop at a bus station
      Trains stop at a train station
      On my desk there's a workstation....

    4. Re:It's all about the portable libraries by FlyingElvis · · Score: 1

      Actually, generic programming does exist for Java, it just hasn't been officially incorporated yet. Generic Java

    5. Re:It's all about the portable libraries by SuperKendall · · Score: 1

      I think the concept of the JVM is still quite valid, even for applications - however, what really needs to be done is to make it so that multiple Java apps share the same VM.

      As for the libraries - what sort of list are you talking about? The Java Collections framework (standard in 1.2 and above, availiable as a library for 1.1.x) provides most of the collections you'd need - trees, linked lists, array lists, hash tables, and so on. It also provides the option to have them syncronized or unsyncronized, immutable, and has utilities for merging and sorting collections. What more could you ask for?

      And though I personally like the power and flexibility of Swing, I can see where it would be too large for some uses - you aren't stuck with the Swing API, there are other GUI toolkits (like bonobo(sp?)).

      As far as STL goes - another poster said that you can get a lot of the benefits of generic programming through use of interfaces, which I've also found to be true. I don't think there's anything you could do in STL that you can't do in Java with a little more work.

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    6. Re:It's all about the portable libraries by SuperKendall · · Score: 1

      I'll admit utter ignorance to the lists in Perl, so I'll concede that the syntax is probably a
      lot more compact - I tend to like a wordy syntax though so I'm very happy with it.

      Instead of Gnome's Bonobo, I actually meant Bongo! Sorry about totally mis-remembering
      that. That is kind of an older toolkit though and I'm not sure how much work is being
      done on it. It was REALLY lightweight though.

      As far as the portable library issue goes, I actually like the idea of hotspot like dynamic
      optimization that I'd prefer to keep things in a VM. As you said though multiple VM's
      running are definitely a drain!

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    7. Re:It's all about the portable libraries by Reality+Master+101 · · Score: 3

      I think you're underplaying the performance problems of Java. I've been using some XML libraries, and was absolutely shocked by the bad performance. In this application at least, Java is at least 10-100 times slower than C++ code.

      I agree with you about the Java-the-language, but the JVM is a millstone around the neck of the language that has got to go. If Java could be natively compiled, it would still be slower than C++, but at least not orders of magnitude.


      --

      --
      Sometimes it's best to just let stupid people be stupid.
  109. Re:pls no more "absolutely independent" language! by Evil+Grinn · · Score: 1
    Just my opinion. Java has it's place and its uses. I *do* like it for network programming. Nice easy applications that can talk over a network. But, it will never be fast enough to program usefull cutting edge programs.

    "Nice, easy applications that can talk over a network" are the cutting edge.

  110. I just got back from OOPSLA by ry4an · · Score: 3

    I just got back from OOPSLA (Object Oriented Programming Systems Languages and Applications) and didn't see a mention of this. Not that that's surprising, but I'd've thought they'd've at least arranged for a BOF.

    Still, one of the smartest things I heard at OOPSLA was David Unger(sp?) of Sun recommending that everyone learn at least one new language a year. His assertion was that everytime you learn a new language you also learn alternate strategies to apply in your other languages.
    --

    1. Re:I just got back from OOPSLA by Aaron+Denney · · Score: 1

      Well, I'm afraid I have to disagree. If you know C, learning pascal or fortran will not teach you a thing. If you know common lisp, scheme will teach you little. Yes, learning new languages can expand your toolkit greatly, but only if they substantially differ from the ones you already know. I would recommend C, python, some lisp variant, smalltalk or objective C, some ML variant, and prolog or mercury.

    2. Re:I just got back from OOPSLA by MemRaven · · Score: 3
      What's wrong with a little Eiffel? Or some Algol even? What's wrong with COBOL for that matter?

      He's right. Learning some things will definitely help the way you think about things. The incredibly strong typing of something like pascal will definitely kick your *ss if you've been doing nothing but C for a while, and I think that's actually a Good Thing. Learning Eiffel if you already know smalltalk is a very different experience.

      Even something like Algol will probably change your views and get you closer to the hardware in many respects (not that you can get Algol to run on most machines anymore....;-)

      What about Ada? Programming by Contract really will teach you something serious about how you actually interact with the rest of your application, and while you'll curse it ("I KNOW what I'm trying to do and it's correct, dammit!") you'll be happier for learning it. Older, but happier.

      And as long as the languages keep coming, there'll pretty much never be a chance to really run out.

      My list would include:

    3. Re:I just got back from OOPSLA by Wesley+Felter · · Score: 1

      Strong typing? Pascal? Compiler ass-kicking? LOL!

      If you really want an experience in strong typing, try out Haskell. I know the type checker kicked my ass quite a few times back in freshman CS days...

    4. Re:I just got back from OOPSLA by Dalroth · · Score: 1

      Oh good LORD ADA is evil!

      I programmed in it for 3 years in college, taking all those stupid lower level Comp Sci course I could've tested out of in high school (I really never understood why I didn't test out of em).

      EVIL EVIL EVIL, especially when you come from a c/c++ background.

    5. Re:I just got back from OOPSLA by Emil+Brink · · Score: 2

      Just because I'm sitting at school right now trying to finish a small project in it, I'd like to add Erlang to that list. It's kind of neat, actually.

      --
      main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
    6. Re:I just got back from OOPSLA by dvdeug · · Score: 1

      Why is Ada evil? I came from a C/C++ background, and now program mainly in Ada. I got tired of keeping track of all the minor details and dealing with the stupid little bugs C++ would let me make and Ada wouldn't. Not having to find a portable subset of the language (cf. Mozilla) and having portable threads is just icing on the cake.

  111. Security? by hinoue · · Score: 2

    Java and C# try to provide both portability and security. This seems to only provide the former. The problem with C/C++ is that as soon as you allow pointer arithmatic, you can't guarantee anything.

  112. Re:Java's problems are not limited to performance by ksmeltzer · · Score: 1

    But no one is writing commercial grade shrink wrap software in those languages.

    Guess you have not looked at Oracle's products yet. All of their tools in 8i are written using Java. Including their DB assistant, OEM Consol, Net 8 Assistant, Installer, and help system.

    Last time I checked Oracle is a put the CD in and install the software type product (shrink wrapped). They put a VM on their CD and the installer uses it. Thus they dictate their Java environment. When Oracle installs, it installs the compatible VM with it. This is how you accomplish shrink-wrapped products with Java. You dictate your environment so that the moron user doesn't have to configure a path to the JVM.

    --
    Crack |
  113. Re:Do you have any idea what you are talking about by DickBreath · · Score: 1

    I do believe I know what I'm talking about.

    I'm sure the STL is the best thing to happen to C++. (Which is really sad.)

    I don't know how you use collections in Java, but the idea is the same -- to let you focus on the logic of your program. It is unclear to me in what manner you find collections are getting in your way?

    As for performance, it all depends on what you need. I'll sacrifice execution speed in order to be able to work at a much higher level of abstraction. It improves development time greatly. Computers are getting faster and cheaper every day.

    When I really need speed, like in a tight inner loop calculating the Mandelbrot set, raytracing, RC5, etc., then I'll write in C/C++ and hook it together with a Java front end. Since the C/C++ code doesn't need any network code, GUI code, file access code, etc. because it is pure computation, it only needs the standard C/C++ libraries and thus is about as portable as the rest of the system with Java. Even the very mechanism used to mate the Java and C/C++ code is portable.

    As for your remark about STL making writing C++ really simple (ignoring the other issues of RTTI, GC, and a safe language) maybe you don't require a very high level of abstraction. Or in complex programs, you don't mind doing all the extra bookkeeping yourself. (lengthening development) The original purpose of high level languages and compilers is to make the computer do more of the bookkeeping (vs. writing in assembler). Just having GC removes a tremendous burden.

    I find STL to be just the opposite. It makes writing C++ programs difficult. Just try to make sense of compilation errors involving STL. That doesn't strike me as simple.

    About 35 years ago, the hot debate was whether to write in a high level language or use assembler. The arguments on both sides were about the same as today. There was a very real difference in execution time -- and on slow computers this difference is highly noticed. Guess which approach won out? As computers got faster, the difference in execution time diminished to the point where everybody takes it for granted that they should write in a high level language. (I'm focusing here on a higher level of abstraction vs. programming closer to the machine which always results in faster execution -- for programs not complex enough or that can afford the development effort to not need the abstraction mechanisms.)

    Maybe I don't know what I'm talking about. But to me, I seem to have found a pretty good environment to write in. Not perfect. Use what gets the job done. If you find C++ to be useful and can work with it well, then great. I know I can crank out lots of stuff in Java, network code, gui's, etc. quickly and never get a core dump, which I find to be important.

    --

    I'll see your senator, and I'll raise you two judges.
  114. Re:Do you have any idea what you are talking about by Zagadka · · Score: 1

    As computers got faster, the difference in execution time diminished to the point where everybody takes it for granted that they should write in a high level language.

    Go read comp.lang.asm.x86 for a while. Not everyone takes it for granted that they should write in a high level language. That said, I agree with you. I think those "I'm going to write an MS Word clone in 100% x86 assembly" guys are kooks. As far as I'm concerned, assembly is only for the inner loop of a realtime system, certain device drivers and certain bits of platform-specific OS code.

    At the same time, I think there are a few features about Java that make it less efficient than it needs to be. The whole "all object are on the heap" thing is really difficult for the JVM to optimize away, and impossible in most cases. The lack of generics plus the fact that the basic types aren't Objects makes containers exceedingly inefficient for things like integers, doubles, etc. The whole "magical Array class" nonsense is just a blatant hack to get around this a bit.

    Despite that, I still think comes out ahead of C and C++ in most of the situations I have to deal with. If I didn't care about execution speed at all, I'd probably use Python for everything. (Python is pretty quick for some things. It really depends upon what you're doing, as with all things.)

  115. Re:You know.... by Anonymous Coward · · Score: 2

    About 2 years ago, people said Java would do pretty much the same thing... but it flopped.

    Uh.... You're joking, right?

  116. Re:Is anyone or any business really gonna back C# by Mr.+Flibble · · Score: 2

    C# is doomed because it is proprietary.

    Hmmm. I would bet that people have said the same about Visual Basic. Now, don't get me wrong, I dislike VB, but you certanly cannot call it a failure, wait... Its proprietary isn't it?

    --
    Try to hack my 31337 firewall!
  117. This is great... by Soko · · Score: 3

    Before it's ported to Windoze, I'd submit the language spec to the IETF or something and have it declared a Worldwide Open Standard. Then no one can pollute it or de-rail it, without showing that they don't "subscribe to Open Standards". Maybe the authors should have Bjarne Stroustrup take a gander - he might provide a ton of help. I'm sure he would like to see this little beauty take a bite out of Java, and C# as well. Cool.

    --
    "Depression is merely anger without enthusiasm." - Anonymous
    1. Re:This is great... by Reality+Master+101 · · Score: 1

      I guess my primary complaint is that he doesn't acknowledge the huge size and complexity is a problem. Yes, every feature has a justification, but the sum total of the justifications doesn't outweigh the massive weight and learning curve of the language (if that makes sense). I guess that's the acknowledgement I'm waiting to hear.

      His solution to most problems of the past has been adding more features. I, like a lot of people, am looking for a language with 80% of the functionality but 20% of the complexity. Java is a good example of that type of language, but Java has its own problems. I just can't imagine him endorsing a language with fewer features than C++.


      --

      --
      Sometimes it's best to just let stupid people be stupid.
    2. Re:This is great... by Reality+Master+101 · · Score: 2

      Maybe the authors should have Bjarne Stroustrup take a gander...

      Bjarne has already gone on record as thinking he doesn't think C++ has any (significant) problems. I don't think he's looking for a "better" language.


      --

      --
      Sometimes it's best to just let stupid people be stupid.
  118. Re:honest reply by DickBreath · · Score: 1

    I agree with you.

    There are aspects of STL that are good and are not present in Java.

    Even ignoring STL completely, there are other good features (templates, typedefs, etc.) in C++ that Java is missing. It was not my intent to suggest otherwise. To not discriminate, there are also other languages with some nice features that aren't present in Java.

    I didn't mean to start a language war. Sorry.

    I was only criticizing the original article on Internet C++. I don't think that C++ doesn't have a right to exist, or doesn't have uses, etc. I was only criticizing Internet C++ as having the disadvantages of the JVM while not having the huge set of advantages of Java. Not to mention Java's momentum (Sun's investment).

    Originally, I said something like: Java has everything going for it except execution speed. Internet C++ has this weakness of Java, yet does not come with all the other advantages of Java. So why should I use it?

    Some other posters here have made some excellent criticisms of Internet C++ as well. My favorite was the one about combining the worst weaknesses of several languages/development tools but not providing the strengths of any of them.

    --

    I'll see your senator, and I'll raise you two judges.
  119. Oh, you would be a "l337 0ldsk00l h4x0r" then by Anonymous Coward · · Score: 1

    and even the instructor takes every chance he gets to point out how java is inferior to C++

    Translation: "I had to change my course materials thanks to this. The bastards are going to pay."

    It tries to help you too much.

    Riiiiiiiiight. We should be toggling everything in from the front panel, isn't that so?

    but the way it handles runtime errors (or, more specifically, FORCES you to handle them) is pathetic

    How about you try working on a project with a lot of other people sometime? This is a feature, not a bug.

    1. Re:Oh, you would be a "l337 0ldsk00l h4x0r" then by setec · · Score: 1
      Riiiiiiiiight. We should be toggling everything in from the front panel, isn't that so?
      Have you ever tried making an outline in MS Word? And it "helps" you with the indenting? This is what I mean. I want the software to do what I tell it to do, not what it thinks I want it to do.

      How about you try working on a project with a lot of other people sometime? This is a feature, not a bug.
      He who writes the code should decide what to with errors, and where. Not the authors of the language. Case in point: CloneNotSupported exception.

      Any more nuggets of wisdom, asshole?

      ================

      --

      ================
      Microsoft is not the answer, Microsoft is the question. The answer is "no".

    2. Re:Oh, you would be a "l337 0ldsk00l h4x0r" then by Anonymous Coward · · Score: 1

      I want the software to do what I tell it to do, not what it thinks I want it to do.

      Java and MS Word are entirely different in this regard. Java isn't second-guessing. It's (gasp!) consistent. As in, things are predictable. Java is Java is Java, wherever you are.

      He who writes the code should decide what to with errors, and where.

      Yes, and the people who wrote the library functions decided which errors you were going to have to handle. What's wrong with this?

      Any more nuggets of wisdom, asshole?

      Oh, come on. If you're going to insult me, at least try harder than this.

    3. Re:Oh, you would be a "l337 0ldsk00l h4x0r" then by The+Milkman · · Score: 1

      erm, rubbish.... every language (no please) has a helpful framework, all you have to do is use it properly, some frameworks are better than others, and java's is better than that of c++... bleeurrrgh...

  120. Re:Java's problems are not limited to performance by dozer · · Score: 1
    On the other hand, there's no excuse whatsoever for Java's designers having left out enumerated types.


    It's not so bad...

    class Color
    {
    private Color() {}

    public Color Red = new Color();
    public Color Blue = new Color();
    public Color Magenta = new Color();
    ... and so on
    }

    (The constructor is private so that you cannot create a Color except in the class itself--no extending the enum after it's declared).


    Now you've got Color.Red, Color.Blue, ... That's really close to C enumerations, and only slightly more typing.

  121. Don't Forget the JVM Issues! by FatSean · · Score: 1

    Ev-er-y JVM's different...

    You run into all _sorts_ of fun stuff when your in-memory data structures get huge!

    But I do like Java!

    --
    Blar.
  122. They aren't paying attention... by bsletten · · Score: 1

    > About 4 years ago, we attempted, unsuccessfully,
    > to port a popular 3D game to Java.

    Well, duh!

    Anybody forming *ANY* opinions about Java (particularly about Java and 3D) based on what there was available four years ago isn't paying attention to what there is now.

  123. Guile VM by BitwizeGHC · · Score: 1

    Personally, I'm more excited about the VM that's going to be in an upcoming release of Guile. Guile is one of the most robust Scheme implementations out there, and thanks to this VM, it will soon be one of the fastest as well. :)

    --
    N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
  124. Re:Initial observations on the VM design by Bryan+Ischo · · Score: 3

    Dude, you are way out there.

    What do you mean when you say that the problem with Java is that you can "push an integer on the stack and pop it as a pointer"?

    First of all, in Java there are no pointers, only references, but I assume that that was just a typo and you really meant reference.

    I've just scanned through the list of Java bytecodes. I stopped after the first half dozen I saw that popped values off of the stack because every single one of them stated that there is a requirement that the type of the value popped off of the stack must match the type expected by the bytecode.

    In other words, Java's bytecodes as defined by Sun REQUIRE that the values on the stack be of the correct type. It's up to the VM to implement whatever checks are necessary to ensure that this is the case, and to throw an Error if a value on the stack is not of the right type (and I've seen it happen, with mangled code, so I know that VM's do it).

    Exactly what bytecode do you think allows an integer to be popped as a reference? Please let me know, because I'd love to check my copy of the VM instruction set spec and verify your claim.

    But I think you're confused. There is NO Java bytecode that allows such a thing.

    And furthermore, this fictituous problem would have no bearing on the GC whatsoever. When a reference goes out of scope, but has been stored somewhere in the heap, then there are only two ways that it can ever be reclaimed:

    1) There is a "free" opcode in the VM that the user can invoke to free the reference because they know that they are done with it. Sun does not provide such an opcode in the Java VM so we have to rely upon:

    2) The GC tracks this reference and frees it when it has determined that is no longer reachable from any reachable data structure in the heap.

    It would have been nice if Sun had made the GC optional, by allowing for manual freeing, but so be it.

    Now as for the verifier - it also has nothing to do with the scenario you describe. The verifier does its work at link time, ensuring that the basic structure of the class file is correct. It is at RUNTIME that this scenario that you describe might happen. And it's not the verifier that handles this - it is the VM itself when, by following the letter of the VM instruction set spec, checks the type of values on the stack to ensure that they are of the right type for the instruction which is popping them, and throws an Error if not.

    Your makes no sense and is clearly false.

    I would really be interested in hearing a further explanation of your position though, if you still feel that you are correct after reading and considering the above.

  125. give me a break by SEAL · · Score: 1
    actual tests showed that the best LISP compilers produced faster, tighter code than the best C compilers.

    What actual tests? Cite your sources. Also I'd like to see a comparison of programmer productivity in LISP, Java, C, and C++, if available. The simple fact is that LISP is not intuitive to most programmers (and that can be said of most functional languages). Most companies don't even touch them. Most of the functional language use I've personally seen has been by academians and researchers.

    In fact, careful benchmarking shows that with the best current JITs, Java performs as well as the best C compilers at most tasks, and better at some.

    Another completely unsupported statement. What benchmarks? What tasks? Just off the top of my head, I can think of several easy examples where this is false. Take anything with bit-fiddling... say, a UUEncoder. I guarantee you that the Java version will be slower (even with a JIT), and use more memory.

    The OS argument I agree with, although I will say that C is good for writing small code, which is arguably an advantage here. However, I believe many daemons are written in C that don't need to be... and this could improve security.

    C is a language which is extremely good for creating hard to trace bugs - memory leaks, data corruption and so on - and extremely poor for programmer productivity.

    Once again - bzzzt. It is a language which gives you extreme control over what you want your program to do. If you are experienced, you learn how to write good code. Someone inexperienced using Java can write incredibly bad code also. The learning curve isn't as steep, and the punishment not as severe (i.e. you don't crash), but that's all. But it's not a substitute for programming experience.

    I write C++ for a living, on a fairly experienced team at a game company. In the past year I've only had to track down one memory leak, and I can't recall any mysterious "data corruption". The advantages of C++ completely outweigh the disadvantages for what I'm doing. Even setting aside performance concerns.

  126. Re:Why not standardize the BYTECODE? by MODERATE+THIS+UP! · · Score: 1

    Hmm, isn't that what M$ did with C# and the .Net runtime? I know they submitted C# to ECMA but I'm not so sure about the Common Runtime.

    --

    PCXL Forever!!!!

  127. Re:It appears .Net is proprietary "global bytecode by SuperKendall · · Score: 1

    So is part of that submission the .NET bytecode format, or just the language? The language means nothing if they can just change the bytecode underneath at will and destroy external compiler projects.

    For instance, what if I wrote a classloader for Java that reformed the .NET bytecode on the fly to Java bytecode? Ignoring for the moment weither or not that is even possible, if they do not have to conform to a standard for the .NET bytecode then they can just change the format slightly in the next release to break my classloader.

    I ask not to be abvasive, but because I really have no idea what they are doing with this issue and I think it's a pretty important.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  128. Re:You've Confused and Saddened Us All by alx512 · · Score: 2

    Everything in java is passed by value.

    The value of an object is an object reference, so that's what's passed when you pass objects. You can modify the object contents, but you can not modify the object reference because it is passed by value.

    Saying C++ is better than Java because your beginning java instructor in college said so is downright silly. Most people I've met, with a few exceptions, teaching java in college barely have a grasp of the language themselves.

    I've been programming professionally for four years, and java for about 2.5 of that. I've learned way more in the industry than I ever did in college.

    To keep learning, I try to surround myself with people who've been doing it for a lot longer than I have (like around 20 years). Since I'm not a C++ guy I have to rely on them for information about the elegance of languages I have not used. These are the common opinions I hear:

    Speaking strictly as a language, most I've talked to that have done both seem to like Java better than C++. C++ is powerful but leaves a lot of room for error. Java is powerful, removes some room for error, and at least tries to enforce OO style, and seems to implement some OO language features a little cleaner than C++ does.

    Two other languages that people seemed to like were Smalltalk and Eiffel. Many seemd to like Eiffel better than java, and looking at it I aggree it has a lot of features I wish java had.

    For the gentlement that was listing java deficiencies, I have a couple comments:

    Lack of parameterized types:

    Nice to have but can live without. Maybe in java 1.4.

    Lack of assertions:

    There are probably a bazillion assertion libraries for java, and how hard is it to write your own? Assertions are simple things and you can write a decent assertion library in about an hour or two.

  129. Re:Initial observations on the VM design by Pinball+Wizard · · Score: 1
    I'm sorry I gave you the impression I was being sarcastic. I honestly did not know the answers to the questions I asked and valued your opinion.

    Thanks again.

    I watch the sea.
    I saw it on TV.

    --

    No, Thursday's out. How about never - is never good for you?

  130. Why not standardize the BYTECODE? by E-prospero · · Score: 5
    It strikes me that in this frenzy to get platform independent binaries, the obvious point of convergence and compatibility is getting lost.

    Java has its version of bytecode, C# has its own incompatible version, and now Internet C++ has its version. Each bytecode is tightly coupled to a specific language (or small subset of languages), and ne'er the `twain shall meet.

    Why not develop the bytecode specification as the point of compatibility? A feature rich "meta-assembly" with all the basic operations, plus a widget toolkit interface, network interface, etc. Provide a specification to the API in a generic, language NON-specific form and provide a reference implementation in a language of choice (Java, C++, C#, Prolog, whatever). Write a compiler backend for gcc and you get a shirtload of language interfaces in one hit.

    Then developers can choose they language they want to develop in, and compile to a binary object format that will run anywhere, and be binary compatible with objects written in any other language!

    Provide a JIT compiler to convert bytecode to system code, and you get a system native binary, using system native widgets (finally ending the GTK/QT/Motif/Xt wars).

    This would make bytecode a sort of half way house between Java et al (One language, one machine, tell me the path to the binary), and CORBA (Many languages, any machine, I'll find the path to the binary).

    Granted, Java (and C#) has given the world a new language which does a better job of object orientation than C++, but they have left the world with yet another language dependency, and a shirtload of code that has to be rewritten in a new language to support the new binary format.

    Am I missing some big point here?

    Russ Magee

    --
    ... and never, ever play leapfrog with a unicorn.
    1. Re:Why not standardize the BYTECODE? by jrstewart · · Score: 1

      You are missing some big point here.

      The language *is* the bytecode. The syntax of the language is just details. It's the semantics of the language and the semantics of the bytecode that have to match (or you have to shoehorn somehow). Fixing a particular bytecode forces you to go to great lengths to implement programming languages with greatly different semantics (imagine you wanted to allow pointer arithmetic in Java).

      So in practice fixing a universal bytecode forces you to a subset of the possible programming languaes out there.

      The astute reader will now be asking: "But doesn't assembly language force you to a particular semantics in exactly the same way?"

      The answer to this is yes. It's exactly the same case, except at least in assembly your code is being executed at native speed. Languages like Scheme and LISP have to use whole subroutines for primitive list operations whereas on a specialized machine you could make car and cdr primitive operations (this was actually done in the early eighties).

      I guess the point is that as long as you are forced to use an intermediate representation like bytecode, you may as well tailor it to be as efficient as possible for your language.

      All that being said, there's no reason for a bytecode for each language out there. One could image say a half a dozen bytecodes for the different major types of languages out there.

    2. Re:Why not standardize the BYTECODE? by TheVet · · Score: 2

      Isn't that what the .NET platform is all about. They've got this VM that a bunch of languages (17?) can compile to.

      From a .NET presentation, we found out that new specs were created for the 17 languages that are supposedly interoperable with .NET. These specs are subsets of the actual languages. For eg, Managed C++ in the subset of C++ that works in .NET.

      The problem with this is that you might lose the features you wanted to use of a particular language in the first place. As an example, why would I want to use Eiffel instead of C#. Lets say because Eiffel allows multiple inheritance and C# doesn't. But the Eiffel compiler for .NET (lets call it Eiffel#) will not accept that code because the Eiffel# specs do not support multiple inheritance.

      The feeling we got from the presentation was that we'd be better of using C# only as you would not gain much, if anything at all, by using other languages in .NET. One guy remarked, "You can use any language in .NET as long as it is C#".


      Vivek Mittal
      Research Technologist
      Telstra Research Labs

    3. Re:Why not standardize the BYTECODE? by eigenhead · · Score: 1
      Write a compiler backend for gcc and you get a shirtload of language interfaces in one hit.

      Then build a processor that uses the BYTECODE natively and then all you have to do is get the entire world to program for it and all our compatability problems will be solved.

      World peace can't be far behind...

    4. Re:Why not standardize the BYTECODE? by DickBreath · · Score: 1

      Would your hypothetical processor also support Garbage Collection?

      In hardware, or software?

      I find this amusing. Ten years ago when I was just finishing a six year obsession with Common Lisp, it seemed hopeless that computer architecture and mainstram languages would ever be designed with GC in mind.

      I did make some bold predictions privately to friends that someday (maybe in ten years) GC would become common because it makes programmers so much more productive. Now I see Java. C#. Internet C++. All with GC.

      Another amusing thing. I remember the p-System from 20 years ago. (Here's a real kicker: I still occaisionally make modifications to a real commercial product written in the p-System because nobody else knows how!) Anyway, the p-System had portable object code across dissimilar architectures. (Prior to the IBM PC and standardization.) It was derided as being too slow. It wasn't, but people got hung up on "Interpreter" and BASIC. Now the world is comming back to an object code interpreter design. JVM. C#. Internet C++.

      Hmmmmm. A processor designed for modern features like GC and portable object code. Hmmmm.

      --

      I'll see your senator, and I'll raise you two judges.
    5. Re:Why not standardize the BYTECODE? by SpryGuy · · Score: 1

      Strictly speaking, 'subset' is the wrong term. Managed C++ extends C++ in several ways (such as adding garbage collection), and has the ability to declare 'unsafe' blocks of code so you can do your own memory allocation or whatever if you want.

      - Spryguy

      --

      - Spryguy
      There are three kinds of people in this world: those that can count and those that can't
    6. Re:Why not standardize the BYTECODE? by theCoder · · Score: 1
      You can use any language in .NET as long as it is C#

      Great comment, but is it possible to design a bytecode that doesn't have that problem? Realistically, C# would just be a more human readable form of the bytecode, and everthing that the bytecode supports, C# would also support. If you design the bytecode first, this seems like a logical thing to happen.

      The reasons you'd want to use another language over C# might be:
      • You hate Microsoft and you'll be damned before you start programming in their language :)
      • You feel more comfortable and are more productive in another language
      • You already have thousands of lines of code in another language


      Of course, this is assuming that you're doing anything for .NET at all :) Personally, I think it's a good thing that MS is trying to be more interoperable. Whether or not it will work I don't know.
      --
      "Save the whales, feed the hungry, free the mallocs" -- author unknown
    7. Re:Why not standardize the BYTECODE? by DickBreath · · Score: 1

      You could use a "union of all languages" approach.

      Just imagine, if you had a bytecode that could run Common Lisp, you could probably run any other conceivable language as well.

      Slowly.

      (You could crawl any other conceivable language as well.)

      --

      I'll see your senator, and I'll raise you two judges.
    8. Re:Why not standardize the BYTECODE? by FigWig · · Score: 2

      don't forget lisp machines.

      --
      Scuttlemonkey is a troll
    9. Re:Why not standardize the BYTECODE? by spongman · · Score: 4
      Exaclty! Why doesn't someone come up with:

      a bytecode that can acommodate many languages (new and old, not just Java),

      a runtime and set of libraries that can be used by any one of these supported languages,

      is designed to be cross-platorm,

      and then submit it to a standards body (ECMA, for example) instead of keeping it propietary (like Java, for example).

      While they're at it, why not allow support for prevalent technologies such as:

      XML/XSLT

      SOAP/WSDL

      Multi-tier web applications

      hand-held devices

      Doh!

    10. Re:Why not standardize the BYTECODE? by woggo · · Score: 3

      You can buy the Java VM specification or read it for free on-line. So there is a de jure standard. As for de facto, there are over 130 languages that can be compiled to JVM bytecode. There's even a GCC *backend* for Java (no, not the gcj *frontend*), which seems like it would obsolete this "Internet C++" project in short order.

      ~wog

  131. Re:Java's problems are not limited to performance by dozer · · Score: 1

    Crud. Make that static public Color Red, ...

  132. We did something like this in '96 with Omniware by OnanTheBarbarian · · Score: 2
    In 1995-1996, I worked with my former advisor, Steve Lucco, on a similar idea called, forgettably, Omniware .

    Omniware was a RISC-like VM, with 16 registers and a instruction set that would not surprise anyone familiar with the MIPS or Alpha. We used a gcc backend to generate this code, and guaranteed against misbehaviour in network-downloaded code by inserting bounds-checking for loads and stores in our VM. We would translate from the VM into native code, doing it on the fly. Translation time was trivial - the translation process was pretty much a 1:1 thing, without complicated optimizations. Our code ran well within the 20% of native code; 10-20% overheads were typical (not counting translation time, of course :-) ).

    The protection model was pretty simplistic - we could essentially build our own paging model (read permission, read/write permission) in software, but it was nowhere near as sophisticated as the mechanisms that Java uses to ensure good behaviour in unsafe code.

    The project never went anywhere; Lucco & Wahbe formed a start-up (Colusa) which was acquired by Microsoft. Microsoft presumably bought the company as a hedge against Java and for the (ick) software patents that Colusa holds in this area (chiefly relating to the software-inserted-checking page protection model). I wouldn't be suprised to hear that C# has some common ground with Omniware.

    The most important lesson, IMO, that Omniware held was that it's quite possible, and maybe even desirable, to do heavy optimization (global and interprocedural) on a low-level intermediate representation. This gets most of the possible optimization done _before_ you start shipping code around the net.

    Of course, your optimizations are limited by the virtual machine - a 16-register machine results in register use that is profligate by x86 standards (we had a simple reallocator, very fast) and parsimonious by RISC standards.

    Java takes quite a different tack. Java's IR is comparatively high-level. Thus, if you want to heavily optimize Java code, you have to do it everywhere, on each VM. This is despite the fact that there will be much in common with the optmization process across many of these different machine types - even between the RISC and x86 families. Of course, Java was solving a quite different set of problems.

    Of course, it's all hogwash. We need to ship random snippets of untrusted code around the net the same way that we need an icepick in the head. What can I say? It was 1995, and we'd all drunk the "mobile code Kool-aid".

  133. Re:Java's problems are not limited to performance by kaisyain · · Score: 2

    Never heard of javadoc, huh?

  134. benchmarking... by jherber · · Score: 1

    java is cool, but your logic is off.

    if you code your java like you should, it will be slower than c. think about it, java encourages object granularity and abstraction, these come at a cost. this will also cost you much more memory to store the meta data a jvm keeps at the class and object level.

    on to the benchmarks... the two tests a jvm did win were tight looped calculations (one involving recursion which the c compiler does not optimize for). given that x86 processors have seperate cache for data and for code, in a tight loop, a jit will not be re-interpreted and will actually just call the compiled function which in a tight loop is not likely to have even left the cache. hardly, a condition that would be seen in the real world except maybe by a codec and those often get rewritten in assembler to gain access to simd instructions.

    for that particular bench, had c++ been invited to the show, a template could have computed the fibonacci series at compile time, thus blowing them all away!

    you should also note that intel'c C compiler was not used, and i've seen other benchmarks where it blow away most of the other C compilers by 10-20%.

    jim

  135. Nooooooo!!!! by KarmaBlackballed · · Score: 2

    Please let C++ die already. It is a bad way to do good things. IMHO

    Extending its reach into the internet will just make it into another COBAL. (A language that lives on through the inertia of its existing code-base volume.)

    This may just mean that better languages like Java will grow at a slower pace than they might otherwise.

    --

    --- -- - -
    Give me LIBERTY, or give me a check.
    1. Re:Nooooooo!!!! by jejones · · Score: 1

      Hey, it's like they said on the page...you don't have to use a new cumbersome language (i.e. you can stick with an old cumbersome language instead).

  136. Re:Why not standardize the BYTECODE? - 2 projects by jherber · · Score: 1

    2 more projects trying to solve that problem:

    http://www.cminusminus.org/

    http://www.google.com/search?q=cache:caesar.ics. uci.edu/juice/intro.html+juice+and+pascal& hl=en

    jim

  137. COBAL - COBOL by KarmaBlackballed · · Score: 1

    I should preview before submitting. :(

    --

    --- -- - -
    Give me LIBERTY, or give me a check.
  138. Somebody doesn't know how to read. by Kevin+S.+Van+Horn · · Score: 1

    >> No real analog to const. The "final" keyword
    >> only prevents assignment. It does not prevent
    >> modification of the object referenced. [...]
    >
    > Why is this a problem? If you absolutely need
    > a static class, use a static class.

    This is a complete non sequitur. Do you have any idea of what const means in C++? I am not talking about whether objects of a nested class have access to the instance variables of the enclosing class, so static classes vs. inner classes have no bearing on the discussion. I am talking about being able to write declarations like this:

    void foo(C const & x)

    or

    void bar(...) const

    meaning that foo takes a reference parameter of type C, and is guaranteed not to modify the state of x, and that the method call z.bar(...) does not modify the state of z.

    > As for docs, that's why there is that
    > wonderful thing called JavaDocs that half
    > the C++ industry has been trying to emulate.

    Again, you completely miss the point or never tried to understand it. I have found, from many years of practical experience, that many errors arise from not being sure whether or not a method might modify the state of an object passed by reference. Javadoc doesn't help you if the person writing the code forgets to put in the necessary comments. But if you develop the reflex habit of always declaring methods to be const when they don't change the state of their object, and always making reference parameters be const if the method doesn't change the state of the parameter, then it is immediately clear what method calls have the potential to change the state of the objects on which they operate.

    >> In a similar vein, no notion of a "const"
    >> method. In fact, you can have a "final"
    >> method, but its meaning bears absolutely no
    >> relation to the use of "final" when applied to
    >> variables.
    >
    > This is because you misunderstand the final
    > keyword. In general, final means that the item
    > cannot be overridden by an extending class.
    > It produces a similar function with variables.

    On the contrary, I understand exactly what final means. The use of "final" in

    void foo() final

    means what you say, but the use of "final" in

    final int N = 37;

    (which may appear in a method body) means something completely unrelated to the first use of "final" -- that you cannot change the value of N.

    >> This results in situations [in Java] where code
    >> outside of an associative container class
    >> (like a set) can screw up the associative
    >> container by modifying the state of objects
    >> contained in that container.
    >
    > Huh? If you've got the object, you've got the
    > object. You are free to modify it.

    THAT'S THE PROBLEM! If you retrieve an object from a set, there are now references to the object within the set and in your code. If you modify the state of that object in your code, you've
    can screw up the set, as its code depends on the states of the objects it contains not changing. The set container has no way of protecting itself from this kind of monkey-wrenching. If Java had an analog to const the implementation of a set container could partially protect itself by returning only const references to the objects it contains.

    > in an Object container just by keeping a
    > pointer to it. You aren't protecting yourself
    > from didly.

    In C++ you can protect yourself, because a set object stores *copies* of the objects inserted into it, and when you iterate over the elements of the set you can only get *const* references to the elements.

    >> No reliable destructors, so you cannot use
    >> the "resource acquisition is a constructor
    >> and resource release is a destructor" idiom
    >
    > [Gives an example using finalize()]
    > Damn! That looks like the resource will be
    > closed just before the class is garbage
    > collected!

    You didn't read what I wrote, and you don't seem to know the very language you are promoting. Java does *NOT* guarantee that any particular unused object will *ever* be garbage-collected, so there is no guarantee that finalize() will ever be called! (It reclaims storage when it has to, but makes no guarantees beyond this.) Furthermore, even if the object is eventually garbage-collected, there is no way of knowing when that will happen. For many kinds of resources, it is not sufficient to know that the resource will be released at some indefinite point in the far future; you want it released as soon as you are done with it! A mutex is an example of just such a resource, and it was one of the examples; didn't you pay attention to what you read?

    >> [Comments about templates in C++ and strong
    >> typing.]
    >
    > You don't seem to realize that this is a
    > double edged sword. If you enforce a type at
    > all times, you can have no genericity.

    It's clear from this comment that you have no clue as to how C++ templates work. The beauty of templates is that they give you both type-safety AND genericity at the same time. I have yet to see any other library that is as generic and flexible as the C++ Standard Template Library, and the STL does this without giving up efficiency in the process!

    > You know, it's this type of acedemia that gets
    > companies stuck with unmaintainable, buggy,
    > non-customizable software.

    This is ludicrous. You've never seen a line of code I've written, yet you're willing to call it "unmaintainable, buggy, and non-customizable." I spend a considerable amount of time worrying about maintainability and flexibility in my code, and I have always had very low error rates in my code. Here are some clues as to the quality of my work:

    - My boss at MasPar described me as "one of the
    most productive and accurate programmers I have
    known."

    - My NewsTracker daemon at Excite underwent a
    significant change in architecture with nary a
    hiccup. (It's called proper modularization.)

    - My rearchitecture of one part of the C++
    libraries used at Excite helped jumpstart
    a couple of stalled projects (hint: I took
    unmaintainable, non-customizable code and made
    it maintainable and customizable).

    - TenFold paid me six figures a year to work on
    their core libraries.

    - Every place I've worked for has been sorry to
    see me go.

    1. Re:Somebody doesn't know how to read. by AKAImBatman · · Score: 1

      This is a complete non sequitur. Do you have any idea of what const means in C++? I am not talking about whether objects of a nested class have access to the instance variables of the enclosing class, so static classes vs. inner classes have no bearing on the discussion.

      I have a perfectly good idea what const means. Most of my programming experience is in C/C++. But, I am not starting an argument about static classes vs. inner classes. (I don't even like inner classes. In general, I find them to be poor form.) When I say use a static class I mean either use a static class or use an immutable one like String. Before you complain about two implementations, keep in mind that Java does has something far more powerful than templates:

      Interfaces

      So let's say that I have class 50WattLightBulb that has the accessor getState() and the mutator setState(boolean). Now if my 50WattLightBulb implements the interface LightBulb which merely contains the accessor getState(), then anytime I pass it as LightBulb, it is immutable. The only time I would have problems is if exposed 50WattLightBulb and told people that they can always cast to that. However that goes against the basic ideas of data-hiding (unless I intended for it to be used directly).

      (which may appear in a method body) means something completely unrelated to the first use of "final" -- that you cannot change the value of N.

      Exactly! It is the final assignment. You cannot change the method code once it is final and by the same token you can not change the variable's assignment. Anyway, this is mere semantics and really has nothing to do with the capabilities of the language.

      THAT'S THE PROBLEM! If you retrieve an object from a set, there are now references to the object within the set and in your code. If you modify the state of that object in your code, you've can screw up the set, as its code depends on the states of the objects it contains not changing. The set container has no way of protecting itself from this kind of monkey-wrenching. If Java had an analog to const the implementation of a set container could partially protect itself by returning only const references to the objects it contains.

      <sigh> If you have a set that you don't want changed, return copies of its objects. Don't return the orginals. Of course there is nothing preventing corruption by pointers that are owned before an addition to the set. No matter what you do in C++ this is still a problem. The only solution is to store copies. This also works in (surprise!) Java.

      In C++ you can protect yourself, because a set object stores *copies* of the objects inserted into it, and when you iterate over the elements of the set you can only get *const* references to the elements.

      See above.

      You didn't read what I wrote, and you don't seem to know the very language you are promoting. Java does *NOT* guarantee that any particular unused object will *ever* be garbage-collected, so there is no guarantee that finalize() will ever be called! (It reclaims storage when it has to, but makes no guarantees beyond this.) Furthermore, even if the object is eventually garbage-collected, there is no way of knowing when that will happen. For many kinds of resources, it is not sufficient to know that the resource will be released at some indefinite point in the far future; you want it released as soon as you are done with it! A mutex is an example of just such a resource, and it was one of the examples; didn't you pay attention to what you read?

      No, there is no guaranteee unless you do the following:

      ...
      System.runFinalization();
      System.gc();
      ...

      Of course it is possible that you are running on a system without the garbage collector. Then you are somewhat SOL. But, as another poster mentioned, make a dispose() or close() method and call it explicitly. If you are going to avoid memory leaks in C++ programs you need to call deconstructors explicitly anyway! Considering though, that Java programmers have far fewer issues with memory and resource leaks, I'd say your arguments about automatic C++ deconstructors don't hold water.

      This is ludicrous. You've never seen a line of code I've written, yet you're willing to call it "unmaintainable, buggy, and non-customizable." I spend a considerable amount of time worrying about maintainability and flexibility in my code, and I have always had very low error rates in my code. Here are some clues as to the quality of my work:

      Correction. I said that this type of acedemia produces buggy and unmaintainable code. I have rarely seen programmers beyond professors themselves that can make the ideas that you promote work. The code usually ends up wildly unmaintainable, inefficient, and buggy. The code reached this stage because these programmers were taught to stick to some hard and fast idea of how programs should be written. Why? Because they were never taught WHY they are programming this way. They do not understand the core concepts of what you are attempting to teach them. What they SHOULD be taught is to be adaptable. To learn to learn. To learn to jump inside the other programmer's head and realize his ideas in writing the ocde.

      But no. That's not the way your type thinks. Adapability? Forget it. This is the way it has always been done and always will be done. Nothing changes. No new ideas. Complacency. Makes me sick. If you would pull your head out for fifteen seconds and try to think different for a few moments, you might understand something new! You don't have to agree with it, but it wouldn't kill you to attempt to understand it. If you can't adapt, you are already obsolete. <sigh> I'm probably just pissing in the wind though.

      My boss at MasPar described me as "one of the most productive and accurate programmers I have known."

      My bosses have said similar things as well.

      My NewsTracker daemon at Excite underwent a significant change in architecture with nary a hiccup. (It's called proper modularization.)

      Yep, so did my 'Filing Cabinet' API for my current employer. To top it off, my devel time to make the changes ended up being cut to a day and a half because the business people couldn't make up their minds about what they wanted. Came out just as beautful as ever.

      My rearchitecture of one part of the C++ libraries used at Excite helped jumpstart a couple of stalled projects (hint: I took unmaintainable, non-customizable code and made it maintainable and customizable).

      Same thing I've been doing at my current place of work with most of the code written by a consulting company. I've also been training the consultants on better programming practices.

      TenFold paid me six figures a year to work on their core libraries.

      I'm sorry. Why am I supposed to be impressed? Six figures is what I'm making. It's pretty much what they pay experienced programmers these days.

      Every place I've worked for has been sorry to see me go.

      Ditto.

      Look, I could get into a pissing contest with you about this, but the plain and simple fact is that you are arguing that Java doesn't allow you to program C++. No duh. Java is Java and C++ is C++. They each require a different approach and differet thinking. Notice that I am not bashing C++ here, only defending Java. C++ has its place, but that place is quickly disappearing. Java has become highly capable and can be supplemented with C to take care of the few low level taks. In many ways it is similar to ten years ago where C & some assembly were a powerful combination in building some of the highest performing systems out there.

      Today is no different, except programming in assembly is really not worth it any more. Processors are relying more and more on the compiler to do its job. This means that the highest price per performace in developing systems is anything compiled. This opens the door to byte code languages like Java where they get another chance at compilation before heading to the processor for execution.

      But I digress.

      My suggestion for you is a very simple one. Try coding a real application in Java sometime. You might like it.

    2. Re:Somebody doesn't know how to read. by Kevin+S.+Van+Horn · · Score: 1

      > [Discussion about using multiple interfaces
      > instead of const.]

      See my comments in another branch of this thread. What you're proposing is much more awkward and a lot of work that most programmers won't do, and the designers of the JCL didn't do either. The const keyword is much, much, simpler and easier to use. I cannot for the life of me see why Java's designers thought they were doing anybody a favor by omitting "const" from the language.

      > something far more powerful than templates:
      > Interfaces

      Not even close. Interfaces are not much different from an abstract base class in C++. Read Matt Austern's book _Generic Programming_, and you'll begin to see what templates can do that interfaces will never even come close to doing.

      > If you have a set that you don't want changed,
      > return copies of its objects. Don't return the
      > orginals.

      Yet this is not what the set class provided in the JCL does, which suggests that the distinction between a container of objects and a container of references is lost on the writers of the JCL, probably due to the fact that Java goes out of its way to disguise the fact that you only have references to objects, not the objects themselves.

      > No, there is no guarantee [that finalize will
      > be called] unless you do the following:
      >
      > ...
      > System.runFinalization();
      > System.gc();

      And that is absurdly impractical. That's just another explicit resource cleanup, which is what C++ destructors let you avoid.

      > If you are going to avoid memory leaks in C++
      > programs you need to call deconstructors
      > explicitly anyway!

      This is a truly bizarre statement. You NEVER have to call destructors explicitly -- in fact, you'd better not call them explicitly -- unless the object in question was created via placement new on raw memory. If you want to avoid memory leaks in C++, just stick to building on top of the standard container classes and a handful of smart pointer classes.

      > I have rarely seen programmers beyond
      > professors themselves that can make the ideas
      > that you promote work.

      WHICH ideas? Are you suggesting that a person needs a Ph.D. to use const correctly?

      > [Lots of personal insults based on absolutely
      > no knowledge of what I am actually like.]

      You seem to have this blind spot that doesn't allow you to even conceive of the possibility of someone who doesn't like Java without being mentally defective. Just because I don't agree with you that Java is the solution to all the world's problems doesn't make me unadaptable, etc.
      I think you need to grow up.

  139. Re:Um, garbage collection? by xr6791 · · Score: 1

    Enums aren't needed in Java.

    As are not templates, typedefs, operator overloading, etc. Right?

  140. Re:Java's problems are not limited to performance by carlfish · · Score: 4
    Header files. It's very hard to have an overview of what a Java class can do, since there's no list of methods.

    That's just bogus. If the information you want can be cleanly generated from the source, why maintain parallel files saying the same thing?

    To get an overview of what a Java class does, generate the Javadoc. That's what it's there for. Even if you haven't bothered to write javadoc comments, you'll get a list of methods and fields for each object. To get a list of methods without generating javadoc, use any semi-decent IDE.

    Use a semi-decent IDE anyway. It's amazing how much more productive you can become with the right tools. I particularly enjoy stepping through a program, changing the source from within the debugger, and have it integrate my change directly into the still-running code.

    Java classes can only extend one superclass. If you happen to have a whole hierarchy of classes, and only one of the most specialised is to be an 'Observable' as well - bad luck.

    As a general rule, if your idea for a class name ends in -able, then you're probably thinking of something better off embodied in an interface.

    I've only ever been in very rare cases where I really wanted to use multiple inheritance. Most of the time, instead, I found that when I refactored my code so that it would work with single-inheritance and interfaces, it ended up being far more elegant.

    On the other hand, there's no excuse whatsoever for Java's designers having left out enumerated types.

    Charles Miller
    --

    --
    The more I learn about the Internet, the more amazed I am that it works at all.
  141. Re:Java's problems are not limited to performance by flumps · · Score: 1

    Ack, flamebait. oh well.
    I myself am using java in commercial applications. So your point falls over, and I dismiss your bait offhand as a cocky over reaction trying to ruffle feathers.
    Now please foad. Thankyou.

    ~matt~
    0
    o
    .
    ><>

    --
    "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  142. Unfortunately... by Doubting+Thomas · · Score: 1

    Sun has NOT comitted to parameterized types for JDK 1.4. I see this as a serious step backward in their progress toward polishing Java.


    -

    --
    Just because it works, doesn't mean it isn't broken.
  143. Don't forget this important one by empesey · · Score: 3

    Slashdot C++. It's the same language, but all the keywords are misspelled.

    1. Re:Don't forget this important one by Emil+Brink · · Score: 2

      ...and repeated several times each day.

      --
      main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
  144. About time... by zoftie · · Score: 1

    Why Java, just improve C++ and declare it C++ cfront 5.0, but uh, oh, Sun would not control the process, and so the way the split in mindshare went. Fuck'em, once stable I'd use IC++

  145. deliberately obfuscated code is not "open source" by smell_the_glove · · Score: 1
    Check out the source code for the virtual machine. It's full of easy-to-understand gems like this:

    _If2(_sCz11d2,4562,s32,s32){{if((GETDATAMEM_s32((( GETCODEMEM_s32(R_PC+2))+R_PC)))<( GETD ATAMEM_s32(((GETCODEMEM_s32(R_PC+6))+R_PC)))){R_PC =((GETCODEMEM_s32(R_PC+10))+R_PC);}else R_PC+=14;};;}_If2E;

    This hardly counts as open source. Try harder, guys.

  146. it's C/C++ that makes it hard by jetson123 · · Score: 2
    The reason why there isn't a single bytecode is because supporting C/C++ semantics and the semantics of most other languages simultaneously is such a pain. It's mostly that C/C++ programs don't have enough type information in the source.

    For example, in C/C++, a string can be a "char *", but that might also be a pointer to a local variable of type "char", or a single heap-allocated byte, or a pointer into the middle of a heap-allocated struct, etc. Other languages have the same concepts, but they use separate types. C/C++'s design choice is simple, but it inherently makes many kinds of runtime checks very expensive, and it makes it nearly impossible to automate the type conversions that occur in multi-language environments. Either the programmers has to write an IDL specification that really expresses what the code intends, or the runtime has to keep track of a lot of extra information.

    Until C/C++ changes and deprecates its "pointer" construct in favor of a variety of other constructs (similar to what happened with casts in C++), an efficient universal runtime for both C/C++ and other languages is always going to be a big project.

    If C/C++ isn't one of the target languages, a universal runtime is pretty straightforward. You could easily do a nice, universal runtime for Java, Modula-3, Prolog, Lisp, and many other languages.

  147. Why a new VM? by LS · · Score: 1

    Why doesn't someone write a C++ compiler that writes out to Java bytecode? That would be a much more useful solution. It's already been done with Ada and Eiffel. Or has someone done it already?

    LS

    --
    There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
    1. Re:Why a new VM? by Prolog-X · · Score: 1

      More information about using Ada with a Java binding can be found in the Ada95 Lovelace Tutorial, Lesson 16.

    2. Re:Why a new VM? by zephc · · Score: 1

      i think fundamental C++ language constructs throw a few wrenches into the works... by the time youve reinterpreted the code into java bytecode you stripped just about all the C++ stuff from it and then it's just java with slightly different syntax

      ------
      http://207.168.234.207/
      Vinnland - A country of True Freedom.

      --
      "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
    3. Re:Why a new VM? by LiENUS · · Score: 1

      Internet C++ is not just another VM it is actually intended for gameplay on the internet ie you click a link on a webpage and all of a sudden your webbrowser has launched iquake3 in fact the people behind internet C++ are planning on putting opengl support into it.

  148. ECMA = European Computer Manufacturers Association by Wesley+Felter · · Score: 1

    IIRC

  149. STL has seriously damaged C++ by jetson123 · · Score: 2
    Well, I use C++ professionally, too. In my opinion, STL is the worst thing that happened during C++ standardization.

    If you look at what most C++ frameworks and applications actually use, it's very little: some kind of array/list, maybe a multidimensional array, and a hash table. That is what C++ should have provided in its standard library.

    If people had wanted something of the complexity and generality of STL, they could always have gotten it as an add-on (or, better yet, used a language in which STL-like frameworks are much simpler, like SML or GJ).

    STL is out of any proportion to the needs of most C++ programmers. Its adoption has delayed the acceptance of standard collection classes for C++ by many years, because compilers needed to catch up with it and because people needed to learn it. That has done untold damage to the language in the market.

    And despite its complexity, STL still fails to satisfy the basic needs of many applications, meaning that most application frameworks still include a number of incompatible collection classes.

    By any measure, I think STL failed: it didn't help the adoption of C++, it didn't standardize existing practice, and it doesn't satisfy the basic needs of working C++ programmers.

  150. Doom was ported.. So what ? by cOdEgUru · · Score: 1

    Now before you moderate me, let me ask you this... So Doom was ported to Internet C++ and Tetris too.. So what ? Until or unless you have major corporations and developer communities take interest in the language, porting games to that particular language is not gonna help. I havent read the features for this Internet C++ yet, so I could be just jerking off here. Anyway my two cents..

  151. Re:What I like about Java and where I hope it goes by scottbell · · Score: 1

    No it's not, as quoted from here: The code scheduling technique was developed for static compilation, and therefore the compilation time was not a major consideration. Even with the simple list scheduling technique for the basic block range, it is necessary to construct a dependence DAG. The worst-case running time is O(n2), where n is the number of machine instructions in the basic block.6 In the IBM JIT compiler, we have implemented a different way of scheduling code within a basic block, running in C * n, where C is the size of the lookahead to be scheduled, in view of the compilation time constraint. Some of the optimizations CAN be quicker at runtime than statically compiled native code optimizations. A JIT, by definition, does not mean a degradation in performance.

  152. what is this???????? by jeffhume · · Score: 1

    WE DONT NEED THIS! we have many of these kinds languages that are much more capable then this. I just dont get it. wow it can do doom and tetris. impressive (notice the dry sarcasim in my voice) cant u people come up with new ideas instead of copying java and doing a crappy job at it??? jeff

    --
    on your signiture put "no m$" i want to see how many ppl agree with me
  153. The Cross-Platform Manifesto by goingware · · Score: 2
    I think The Cross-Platform Manifesto is relevant here.

    78. Although they have been the most prominent, Netscape's Navigator and Sun's Java implementation are not the only manifestations of middleware that Microsoft has perceived as having the potential to weaken the applications barrier to entry. Starting in 1994, Microsoft exhibited considerable concern over the software product Notes, distributed first by Lotus and then by IBM. Microsoft worried about Notes for several reasons: It presented a graphical interface that was common across multiple operating systems; it also exposed a set of APIs to developers; and, like Navigator, it served as a distribution vehicle for Sun's Java runtime environment. Then in 1995, Microsoft reacted with alarm to Intel's Native Signal Processing software, which interacted with the microprocessor independently of the operating system and exposed APIs directly to developers of multimedia content. Finally, in 1997 Microsoft noted the dangers of Apple's and RealNetworks' multimedia playback technologies, which ran on several platforms (including the Mac OS and Windows) and similarly exposed APIs to content developers. Microsoft feared all of these technologies because they facilitated the development of user-oriented software that would be indifferent to the identity of the underlying operating system.

    -- Thomas Penfield Jackson, U.S. District Judge, Findings of Fact

    --
    -- Could you use my software consulting serv
  154. pls no more "absolutely independent" language! by RelWorp · · Score: 1
    why?
    nobody needs it!

    i dont like the sentence on the InternetC++ Website:
    "You can have the real thing. Why program in proprietary languages, such as Java and C-Sharp that are incompatible derivatives of C++?"
    who says or feels mindful enough that java is an incompatible derivate of c++? that guys which comes whith cheap marketing like "... you can have the real thing ..."
    does that people even know whats the difference between java, c# and c++ or even that derivative internetc++?

    i keep believing in java. there are too much "things" coming (and also leaving) the time. java stays!

    RelWorp

  155. eiffel by matman · · Score: 1

    As someone starting to get serious about programming (moving on from scripting languages like TCL, PHP, etc) I've been looking around at languages deciding what to learn. Something that I found that looks sort of neat is Eiffel. It's a statically typed, dynamically bound, object oriented language with multiple inheritance and all of that jazz. It does pre/post conditions and throws exceptions when conditions are not met. Although it doesnt have a very large following, I thought that it looked neat. It has unix based compilers, is fairly open source (smalleiffel a compiler is under the GPL) and, it's apparently used for MS's evil .NET stuff in some sense. It can compile to java. God this sounds like an ad - I just thought that I'd share - after all this article is really just an ad for internet c++.

  156. good in a way, bad in a way by Lx · · Score: 2

    It's great to hav cross-platform programming languages, but can we PLEASE have a language that isn't based on C? At all? I for one, hate C++ - I hate languages that are similar to C++, and I don't know many people who like it all that much. How much longer are people going to keep using a primitive language just because it's what they're used to?

    I'd like to see some innovation in actual language design sometime - Python and Haskell are a good start.

    -lx

    1. Re:good in a way, bad in a way by SpryGuy · · Score: 1

      I love C++. Well, call it a love/hate relationship, but it's more love than hate (at least when I'm not maintaining someone else's brain-dead code...)

      I really hated C though. Annoyed the crap out of me for the longest time. It wasn't until I 'found' C++ that I understood why... C++ just seemed like a natural fit to my brain. Go figure.

      But what syntax would you approve of? Frankly, the only other syntax I know of that has anywhere near as wide-spread a knowledge base is COBOL, and that knowledgebase is growing older and beginning to fade. The main reason for all these C/C++ variant syntaxes is that so many people already are familiar and comfortable with them (even if everyone still argues about bracing and indenting styles ;-)

      I sure as hell don't want a BASIC-like syntax to take over. UGH. And (Object) PASCAL? Not really into that either, though it's an improvement over VB, that's for sure. Maybe you mean something more Objective-C-like? I hope not LISP-like... gads, I get lost in parenthesis ;-)

      - Spryguy

      --

      - Spryguy
      There are three kinds of people in this world: those that can count and those that can't
  157. curious.... by fjordboy · · Score: 1

    Why would we want a standardized language? I thought that greatest thing about the opensource movement was the diversity of programs and languages. I certainly don't want one all encompassing language to be the standard. Everyone has their own taste. It reminds me of microsoft making everything the microsoft way and everything was their way or it didn't work. I am sorry, but I like diversity in languages.


  158. Re:What I like about Java and where I hope it goes by ddankwerth · · Score: 1

    Runtime Optimization is the Next Step
    The Future of the Java VM is to make Runtime Optimization,
    to Collect Statistics on Object Access, Memory Usage ... on the fly and Act accordingly
    For Example, pre-allocate memory on a low Level thread (like the Garbage collector) That memory will be available for Heavy Objects ...

  159. Re:Java's problems are not limited to performance by cduffy · · Score: 2

    Python is (sort of) bytecode-compiled. You can release the bytecode only and keep your source to yourself if you like -- it's easy to reverse-engineer, but as a commercial software developer you can use licensing against that (or, at least, you can keep yourself delusioned that you can).

    And finally... When not doing Python, I'm a C programmer, mmm-ker? Much of the C I've worked on in the last year (except fixing stupid build issues and the like) has been kernel code. I'm no COBOL monkey, and much more than a UNIX admin only.

  160. Re:Initial observations on the VM design by bellings · · Score: 1

    It looks like some of it may have been auto-generated. If so, then the starting files for the autogen process should have been distributed - not the output.

    What for? This is an "open-source" project, in the sense of "Open VMS". I'm fairly damned certain it won't open in the sense that any of us would recognize.

    --
    Slashdot is jumping the shark. I'm just driving the boat.
  161. Different object models by Raffaello · · Score: 1

    "JPython, for instance, is Python that compiles to Java bytecode. I don't think there's any reason this concept couldn't spread to other languages."

    Because other languages have different object models which can not be translated into Java bytecodes without a huge hit in execution speed.

    The JVM constrains what type of language you can compile from and still hope for reasonable execution speed. Languages with a great deal of reflection (e.g., Smalltalk, Common Lisp) are pretty much screwed.

    You need a better VM if you really want cross-language capability. The JVM won't do it.

  162. Speed Question? by Overnight+Delivery · · Score: 1
    Internet C++ brings speed, performance and portability, all in one package.

    I don't understand how they're going to be any faster than Java/C# when they also have the baggage of a VM.

    Anyone know if there's a basis for the speed claim?

    --

    When it absolutely positively has to be there.

  163. About bloody time by Dwonis · · Score: 1

    Something "new and innovative" is actually done right!
    --------
    Life is a race condition: your success or failure depends on whether you get the work done on time.

  164. Re:God save us. by istartedi · · Score: 2

    Heheh... If they just wrote a backend to gcc, then doesn't this stuff have to be GPL? That's one of the big reasons I rejected such an approach... that, and the fact that if I ever wanted to distribute a Windows plugin for IE, I'd have to put up gcc for download (The vrml3d.com C-virtual machine is really cool, just sit through this 20 meg download and you'll see...)

    OK, maybe now I'll get off my butt and splice my "security" hack together with the OpenGL module for EiC and build it into a Netscape/IE plugin for Windows. Anybody wanna wager I can pull it off in less than a week?

    The only trouble would probably be the OpenGL module, since I've never fussed with it, and it might actually be a Mesa module, in which case it probably isn't Windows friendly. Other than that, this shouldn't be rocket science.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  165. Lisp. by Raffaello · · Score: 1

    "On a side note, which is better: C++ or Lisp?"

    Oh, that's easy - Lisp is much better, especially Common Lisp.

  166. Initial observations on the VM design by rhysweatherley · · Score: 4

    His heart is in the right place, but the implementation leaves a lot to
    be desired. 200000+ lines of code in one source file! Yikes! It looks
    like some of it may have been auto-generated. If so, then the starting
    files for the autogen process should have been distributed - not the output.

    From my shallow understanding of the code (I've spent 30 mins on it so far),
    here are the problems I see:

    1. Not thread-safe. The VM register state is kept in global variables.

    2. If this is their "fast" VM, then I'd hate to see their "slow" one.
    Dispatch functions are used for opcodes. i.e. every instruction
    involves a table lookup and a function call overhead. Tip for
    VM writers: use a switch statement! All of the VM state
    can be kept in local variables, which C compilers can optimize
    very heavily. If you split it across multiple functions, then
    you are defeating the C compiler's optimization of the interpreter!

    3. Doesn't appear to be pointer safe, so this cannot be used for
    "download and run" applications, which destroys its usefulness
    as a real Java replacement. (Yes kids, C can be made pointer
    safe - see EiC - it's a question of how much overhead you want
    to tolerate).

    4. X11 access appears to be more or less raw to the X server. This
    would allow lots of fun and games to be played: full X11 gives
    you the ability to mess with other application's windows, inspect
    the clipboard, the user's resource settings, and generally get up
    to insecure mischief.

    5. No instruction set documentation so that a better VM could be
    written by someone knowledgeable about such matters.

    6. Too much code. Another tip for VM designers: if you get 10,000
    lines of code into a VM, and you've barely scratched the surface,
    then your design is wrong and you should start again. The target
    size for VM's should be around 40,000 lines max. Both Java and C#
    get this wrong, BTW.

    Nice try, but we'll have to wait for someone else to come up with a
    better VM design before we can use C/C++ on the Internet. It's possible,
    but not this way.

    1. Re:Initial observations on the VM design by Pinball+Wizard · · Score: 1
      Just a question from someone who's never used such a tool - what do you use to autogenerate code?

      You obviously have had some pretty heavy duty development experience, but then again I've written projects that run into tens of thousands of lines. It just seems that 40,000 lines of code is awfully minimal for something as heavy-duty as a VM. Do tell. I've never written anything other than simpler interpreter in terms of designing a language. Is it really that small of a project?

      I love it when people explain seriously heavy duty programming in plain English. Thanks. Someday I'll compile a bunch of posts just like yours on a website.

      I watch the sea.
      I saw it on TV.

      --

      No, Thursday's out. How about never - is never good for you?

  167. God save us. by bellings · · Score: 5

    According to their own white paper, all these bozos have managed to do is write a 32-bit virtual machine and a version of gcc that targets that virtual machine. Apparently, they've managed to get that virtual machine to run on top of "some" versions of Linux, and "some" versions of BSD, and soon, perhaps, they hope to get it running on top of "some" versions of Solaris.

    I imagine this took a heck of a lot of work. Its kind of cool, in a geeky sort of way. But in the big picture of things, Whoop-de-freakin-doo.

    The only libraries they claim to have abstracted out are Motif and X-Windows (which I don't recall being particularly system different on Linux and Solaris to start with). Which means that as long as you don't use any of the incompatible system libraries (such as sound, networking, process control, signals, or, umm, anything else), you can write a C++ application with an executable that runs on both Linux and Solaris! (Provided, of course, you have the virtual machine installed.)

    It's hard to tell if these guys seriously think this is cool. I think they might be trolling the entire world -- I imagine it must take a few brains to write a new back end for gcc, and I can't imagine anyone smart enough to do that would seriously believe the ability to run the same executable on both Solaris and Linux has any real value any more. If so, they seem to have somehow totally missed where the real value of languages like Java (or Perl, or Python) lie.

    Internet C++ shares with Java, Perl, and Python the ability to compile once, and run anywhere (slowly). But so what? If you don't use any libraries, you can already write a C++ program that will compile on Linux and Solaris anyhow. But it totally misses out on the huge portable standard libraries Java, Perl, and Python have developed. And it also totally misses one of the fundemental reasons for C++'s existence in the first place -- the ability to run "close to the metal" when needed.

    So, its a new language that combines all the disadvantages of C++ with all the disadvantages of Java, plus all the disadvantages of being a silly little niche language written by a couple of hobbyists in their spare time. I'm certain that James Gosling is shaking in his boots.

    --
    Slashdot is jumping the shark. I'm just driving the boat.
  168. Um, garbage collection? by image · · Score: 3

    I completely agree that C++ is one of the most versitile and prevalent languages in use today.

    However, Java and C# were both designed to *add* value to C++. Sure, Java should have had enums, and C# is Windows only (for now) but the concepts of both are pretty clear -- take the best of C/C++ and extend it to create a new, more powerful language. For example, both Java and C# run on a virtual machine and offer memory management.

    While Internet C++ may seem like a pretty nifty idea, it is missing the point a bit. The fact that C++ is hardly a standard (trying writing an application for both g++ and VisualC++) should *not* be addressed by creating a C++ virtual machine. It should be addressed by aggressive co-operation between compiler vendors and with standards bodies that move in internet time, not academic time. And since MS seems unlikely to co-operate with GNU (and vice versa), there is a definite need for new languages such as Java.

    If Internet C++'s objective was to create a new language that a) ran on a cross-platform VM, b) added new language features such as garbage collection or invariants, and c) was a free standard, unencumbered by MSFT or Sun, then they would have my blessing. However, they're simply trying to add more overhead to solve an already weighty problem. In other words, this company is about 10 years behind the curve.

    (Disclaimer, I'm ex-Microsoft. I think C# is a great step forward for programming languages. I just won't start using it until it runs on my OS of choice.)

  169. Where is the mindshare supposed to come from? by Carnage4Life · · Score: 2

    Between C# and Java most of the developer mindshare for cross-platform server applications has been staked out. This language has to have a whole lot more going for it than simply being Open Source. It is battling incredible odds against entrenched languages/platforms, powerful companies with tons of research and development staff(Sun, MSFT, IBM, etc), several thousand developers, and the natural inertia that keeps people from trying anything new.

    It seems to me from reading the page that their major claim to fame is that they are Open Source and as all those who have watched GNU Hurd development goes, being Open Source does not automatically imply mindshare.

    PS: What the heck do they mean by the New Internet? Sounds like a rehash of every major Sun, MSFT, etc launch of the past few months/years.

    Second Law of Blissful Ignorance

  170. Re:Is anyone or any business really gonna back C# by ikekrull · · Score: 2

    Personally, I won't be using it.

    After developing my latest little project in Java, and having it run without recompilation on Linux and Windows, i'm sold.

    As it stands, Swing is the worst thing about Java today, but hopefully we'll get a fast native GUI from Sun at some point in the future.

    Anyone know of there is some kind of JNI interface for GTK+?

    I quite like programming for the AWT, it's not too slow, but it does take some work to implement the groovy stuff like transparency and arbitarily rotated text and things.

    If i wanted a language purely for its OO features, i'd use Smalltalk, Objective-C or Python perhaps.

    C# is a waste of time.. If MS had concentrated on improving Java performance instead of getting all pissed off they couldn't use it as a tool to tie users to their licensing fees, we might have a high-performance Java today. Now theyre reinventing the wheel, yet again.

    The most ridiculous aspect of the whole thing is their claim you can write C# code in any language you like, except the one that's semantically and conceptually closest - Java.

    Is there actually a good technical reason for not supporting Java syntax with C#?

    --
    I gots ta ding a ding dang my dang a long ling long
  171. honest question by CoughDropAddict · · Score: 1

    Collections/containers/algorithms that aren't the abomination that is STL.

    Why is STL an abomination? I've never heard anything negative about it before, and never had any problems using it.

    --

    1. Re:honest question by synx · · Score: 1

      futhermore, STL is type safe and java's Vectors are not!!! you have to do a secondary check EACH time you read something from a Vector to make sure its what you want... always recasting and invoking the run-time type checking....

      unlike in STL, where you cannot put anything BUT an int into a vector ... simply impossible. error cannot happen, it wont even compile.

  172. You've Confused and Saddened Us All by Carnage4Life · · Score: 5
    Both Java and Python are much much nicer to program in than C++. This isn't flaming, but you obviously haven't done any C++ programming. I have to take a java class in college right now, and even the instructor takes every chance he gets to point out how java is inferior to C++.

    Sad, how I jump at this flamebait but here goes. Your instructor is the kind of clueless academic that makes me realize that the way CS in colleges is taught seriously needs to be overhauled. Before you attempt to question my C++ creds, I will establish that I am currently using C++ to implement the server end of this project. That said, let's go over why you think Java sucks.
    1. 1.)
    2. Java sucks because everything is passed by reference: When you take upper level classes and concepts like the call stack are explained to you, you will realize that passing Objects around by value is expensive, inefficient and wasteful. Even in C/C++ non-primitives are usually passed by reference either via pointers or explicit references.
    1. 2.)
    2. Java sucks because it forces you to write code to handle potential errors in a program: This reason is so illogical it does not deserve an answer.


    Second Law of Blissful Ignorance
    1. Re:You've Confused and Saddened Us All by graystar · · Score: 1

      I can understand part 1, but part 2 is good. Since it improves program correctness and stops buggy programs. This improves the quality of your code since your forced to be aware of potential stuff ups.

      --
      -- Cheer, Cheer, The Red and the White.
  173. Re: UpDATE by SuperDuG · · Score: 2
    I Was actually able to compile a few files from the 21 meg file ...

    iaddr2line.exe
    iar.exe
    ias.exe
    ic++filt.exe
    igasp.exe
    ild.exe
    inm.exe
    iobjcopy.exe
    iobjcopy.exe
    iranlib.exe
    isize.exe
    istrings.exe
    istrip.exe

    anyone wanna help me out and tell me what else I need or if I'm even going in the right direction ... BTW still no luck getting the VM to compile.

    --
    Ignore the "p2p is theft" trolls, they're just uninformed
  174. Scrubbed C, EiC, etc... by istartedi · · Score: 2

    I had the same idea quite some time ago.

    I've worked a little with EiC which is an Open Source (Artistic license) package that allows you to run C programs as scripts on many platforms (but it does not have a portable binary VM format).

    I have also written a VM of my own, and a parser for C99, but they are not releasable quality yet. If I ever do release it, it'll be either BSD or artistic.

    I'm not really plowing a great deal of effort into this, because in order to gain wide acceptance, it would have to be free, and well... there's that pesky money issue.

    When I saw this, my jaw dropped... but there is no Windows or Mac version. If they come out with a Windows version, this may be the one I've been waiting for. It would be so nice to see Java just curl up and die. It was a bad idea right from the start. I don't care if this guy releases his stuff as Open Source or not. Simply by putting a C/C++ VM on my box, and having my C/C++ skills be important for both stand-alone *and* internet applications, he would be doing a great service.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  175. Re:Is anyone or any business really gonna back C# by Wesley+Felter · · Score: 1

    And if ECMA publishes C# as a standard, you're going to have to find a new reason why it is doomed.

  176. Doom is jumpy? by cot · · Score: 3

    If Doom is jumpy on any kind of modern system then you know that this is one inefficient port.

    --

  177. Re:Cross Platform C++ libraries by SpryGuy · · Score: 2

    Try looking at ACE.

    The ADAPTIVE Communication Environment (ACE(TM))

    It provides abstractions for mutexes, threading models, standard libraries, etc. It's not perfect, but it works pretty well. And it's free, open source, and cross-platform. Does this fit your bill?

    - Spryguy

    --

    - Spryguy
    There are three kinds of people in this world: those that can count and those that can't
  178. irony, silvery and goldy by ivorh · · Score: 1

    Indeed Baldricks definition of Irony is certainly better than Alannis Morrisette's.
    It isn't just the net that is to blame, maybe I'm mistaken but generally the term seems to be accepted in the US as meaning coincidental.
    Orv.

  179. /. inconsistency? by Anonymous Coward · · Score: 1

    Jim Thompson is also known by the handle "kzinti" on Slashdot.

    Note: The opinions expressed in this editorial are those of the author and not necessarily those of 32BitsOnline.

    ------------------------------------------------ --------------------------------

    A dialog in two parts.

    Dorothy is sitting in front of her PC, staring at the screen when her friend Kordell drops by to visit.

    K: Hello, Dorothy.

    D: Hi, Kordell.

    K: Say, you look pretty bummed. Hacking some more nasty perl?

    D: No... I've just been reading Slashdot.

    K: Slashdot? That Internet site where you geeks and techheads hang out to talk about computer stuff?

    D: We talk about more than that, but yeah, that's the place: www.slashdot.org.

    K: Hey, I heard someone at the computer lab today talking about a huge brouhaha over there. What happened?

    D: You remember Jon Katz's Hellmouth series last year?

    K: About the Littleton shootings?

    D: It wasn't about the shootings themselves, but about what happened around the country afterward. He spoke of how fears of "trenchcoat mafias" ignited irrational fears. That geeks and goths and other "misfits" became the subject of much unwanted attention just because they weren't popular or athletic, and about the difficulties of being a teen who just doesn't fit it. Jon Katz wrote some Slashdot articles about what was happening, and he got a ton of e-mail from people all over the country experiencing similar persecution.

    K: Sure, I remember -- you made me read those articles . . . but that was last year.

    D: Right, well, the Slashdot guys took Katz's articles and many of the Hellmouth posts and compiled them all into a new book called Voices from the Hellmouth. They announced it Thursday -- the anniversary of Littleton.

    K: So what's the problem?

    D: Well, it's about the posts they published... they published them anonymously and without the permission of the posters.

    K: Anonymously?

    D: They stripped the posters' names off the posts when they compiled them -- but what I'm upset about is that the posts were published without permission.

    K: You mean that they didn't ask author's permission to republish their posts?

    D: That's right.

    Kordell makes some extremely rude noises.

    K: So what? Slashdot's a public forum. Anything anyone says there is in the public domain. Slashdot can take the posts, publish all the books they want to, and nobody can say anything.

    D: Not exactly. Just making statements in public doesn't make them public domain. Remember that Pumpkins concert last year? They performed in public, but that doesn't make the performance public domain. If we'd recorded it and sold the MP3 on the 'net, their lawyers would have been all over us.

    K: But people used to record Grateful Dead concerts...

    D: Because the Dead gave them permission to. They voluntarily gave up some of their copyrights to encourage people to spread their music.

    K: And they probably gave up lots of record sales in the process. I bet their label loved that... So people are upset because Slashdot is going to get rich off their posts? I guess I can understand that.

    D: Slashdot is going to donate all the proceeds to charity. No one is going to get rich.

    K: Then what are the whiners complaining about? Their work is going to support charity; they should be glad.

    D: What happens to the money isn't the issue. It's irrelevant.

    K: How is it irrelevant? No one's getting rich off their work... so why should they care?

    D: Look, Kordell, what if I took that old beater of yours, drove it down to the Salvation Army, and donated it to them.

    Kordell laughs.

    K: You wouldn't get much for it!

    D: So it would be OK with you, then? The money would be going to charity, so you wouldn't mind that I didn't *ask* first?

    K: OK, I see your point. I'd be pissed. My old car isn't the same as a bunch of Slashdot posts, though; it's an entirely different issue. I mean, doesn't the subject matter count for anything?

    D: You mean of Hellmouth?

    K: Exactly! I read most of those articles. There were some deeply profound and compelling stories there... life-altering and life-defining experiences. The kind of stories that should be shared and retold.

    D: Actually, I agree with you... they *are* stories that should be shared and retold.

    K: Then what's the problem?

    D: I also think Jon Katz's last book is a story that should be retold too. But if I scanned it into my PC and redistributed the scans on the Internet, how long do you think it would be before I heard from Katz's lawyers? Or his publisher's lawyers?

    K: But Katz owns the copyright to his books.

    D: And the Slashdot posters don't own copyright to their comments?

    K: No. Not if you post to a public forum like Slashdot. That puts the comments into the public domain.

    D: That's funny, because Slashdot doesn't seem to agree with you.

    K: Now you've really lost me. Isn't it Slashdot that's taking all the heat for republishing without permission?

    D: Yes, but... well, have you ever read the fine print on the bottom of a Slashdot page?

    K: You know I don't read Slashdot, and you know *nobody* reads the fine print.

    D: Well, some people do. Here, let me show you what I mean...

    Dorothy brings up www.slashdot.org in her browser and scrolls to the very bottom of the page. She points to a line of text.

    D: Can you read that?

    K: "All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the Poster. The Rest Copyright 1997-2000 Andover.Net."

    D: So now tell me... what is Slashdot's position on ownership of posted comments?

    K: Well, according to this, the poster owns their comments.

    D: Then, O Enlightened One, how can Slashdot claim that they are justified in republishing posted comments without the permission of the owner?

    K: Maybe their concept of ownership doesn't extend to copyright?

    Dorothy snorts in exasperated contempt.

    D: Well if "ownership" doesn't mean copyright, then what could it possibly mean? I mean, what's left?

    K: Maybe it's just a liability disclaimer. You know, so that if someone posts something incredibly insulting to the President or the Pope, Slashdot can just point to the disclaimer and say "We don't own that comment -- the poster does."

    D: That would be hugely disingenuous on their part. And, if it ever got out that that's what they meant by ownership, it would alienate most of their readers.

    K: It's no worse than what many web sites do.

    D: But Slashdot isn't just any web site; they portray themselves as being different -- "News for Nerds" and all that.

    K: I'm not sure I follow you.

    D: It's like this: Slashdot often champions the cause of the Little Guy, especially against the Government or Big Corporation. It's part of their identity. When a large corporation's lawyers try to take away the web site of some little nonprofit or Mom-and-Pop, Slashdot publicizes the conflict.

    K: You mean like the Etoy fiasco last year?

    D: Exactly. When etoys.com sued etoy.org and tried to take their domain name, Slashdot published several articles. Likewise, when Colgate/Palmolive went after ajax.org, and Archie Comics went after veronica.org. There were others too...

    K: And Slashdot always takes the side of the little guy? They use their editorial voice to assert this position?

    D: What "editorial voice"? This is *Slashdot* we're talking about. But yeah, their editors say things like "Nice to see the little guys win one..." or "Perhaps we can help Veronica..." And one time Rob Malda said "I'm willing to buy one of those Rios just to make a statement against the RIAA goobers...."

    K: So it's not just domain-name disputes where they side with the little guy?

    D: Oh no, there are much bigger battles being fought like mp3/Napster/Gnutella vs. the RIAA, the DeCSS vs. the MPAA, Linux vs. Microsoft, and Echelon vs... well, most *everybody*.

    K: OK, I see the pattern, but what does all that have to do ownership of posted comments?

    D: It sets up certain expectations. People expect them to behave differently than all those big organizations they constantly criticize. People expect them to behave, well, *better*.

    K: That's stretching things a bit, don't you think?

    D: I have one more example. You remember GeoCities?

    K: Yeah, they were bought out by Yahoo last year.

    D: Yup, and when Yahoo bought them out, Yahoo's lawyers tried to change the terms of service under which people could post their pages. Yahoo tried to claim that they *owned* anything posted to their site, regardless of who created the content.

    K: Stop right there. A blind man could see where you're going with this.

    D: Right. But there's a peculiar irony here... Yahoo eventually capitulated and changed their terms of service. When Slashdot posted a story announcing the change, they quoted the guy who submitted the story to summarize Yahoo's new position. He said: "So while they don't own your web page, they can still do whatever they want to with it."

    K: Whoa. And Slashdot's position is "You own your comment, but we can still do whatever we want to with it."

    D: Seems to be. Eerie, huh?

    K: Yeah, but so what? I still don't see how that's going to hurt Slashdot. So they've given people ownership of their postings, then disregarded that onership? I still doubt you could build much of a legal case out of that.

    D: Look, you're just not getting it. This is not a legal issue; it's a moral issue. It's not a question of whether it was *legal* for Slashdot to repost all those comments, it's a question of whether it was right for them to do so.

    K: Oh come on, you can't convince me that all those geeks care about a question of morals.

    D: That's exactly what I've been trying to tell you. They do care, many of them. Go read the posts. They care about whether it's right for some big corporation to take away baby Veronica's web site. They care about whether it's right for the MPAA to quash the DeCSS software. They care about whether it's right for the NSA to eavesdrop on their e-mail.

    K: And you think they'll care about whether it's right for Slashdot to do what they've done with user comments?

    D: I do. Furthermore, I think many Slashdot posters are going to feel at least somewhat betrayed. Slashdot has always tried to take the high ground... and yet now they're behaving like another Yahoo.

    K: How many of *your* posts did they appropriate?

    D: Of mine? Well... none.

    K: *None*? Then why all your bitching and moaning?

    D: Because I've made posts on lots of other topics at Slashdot. I made those posts under the promise of Slashdot's copyright notice - that my posts belonged to me. But maybe some day Slashdot will decide that one of those other topics is at the center of another moral imperative that requires them to publish my posts in another book... without my permission.

    K: Would it really harm you if they did?

    D: Not in the sense that it would cost me money, but there's more at stake here than money. What about my reputation? What if I don't approve of their moral imperative? My right to decide how my words are used, what reputation I earn, and what causes I'm associated with is *very* important to me.

    K: OK, OK... So you and a few others have created an uproar. Has Slashdot responded?

    D: Jon Katz and Rob Malda posted a long and rather eloquent defense of the book. They made great points about the significance of the Hellmouth stories, about what Jon Katz called their "moral imperative". But the essence of their argument was that their cause was so important that it didn't matter whether they acquired the permission of the posters. They barely addressed the issue of posting without permission, and where they did, the gist of their statement was that seeking permission was too inconvenient, so they wouldn't do it.

    K: And that's what you're pissed off about?

    D: What I'm pissed about is the implication that by raising questions about ownerships and permissions, I and people like me are trying to prevent the publication of the book. In doing so, Jon Katz compared us to the "journalists, administrators, and parents" who have tried to silence the Hellmouth posters.

    K: But aren't you trying to do just that? If the Slashdot people have to stop publication while they try to track down all the Hellmount posters, it *would* effectively shut down the book. Perhaps indefinitely.

    D: I don't want to stop the book, or even to delay it. Let them publish. But, at the same time, they should acknowledge that they violated their own copyright policy, and that they made a mistake in doing so. Not in the sense that it was wrong to publish the Hellmouth articles, but that it was wrong to ignore their copyright promises to their users. And more importantly, they should define for future reference *exactly* what it means that a person "owns" their comments. They should write down that policy in detail, and they should stick by their policy.

    K: And you feel strongly about that?

    D: This is Stuff That Matters.

  180. Tidbits of information on C-Sharp by Anonymous Coward · · Score: 1

    Dr. Dobbs has as an article about C-Sharp in comparison against C++ and Java. Has some sample code too.

  181. Going the wrong way by Mnemesys · · Score: 2

    For years I've been waiting for someone to make Java run as fast as C++. This does exactly the opposite: it makes C++ run as slow as Java. Great, now the worst things about C++ (goofy syntax, poor object orientation) is thoughtfully combined with the worst thing about Java (horribly slow, incompatible VMs).

    As a developer of software in which execution speed it absolutely crucial, "Compile once, run anywhere" doesn't mean a damn thing to me if it runs slow. "Compile n times, run on n platforms" is what I *really* want. If we only had decent NATIVE code Java compilers for every platform upon which Java runs, I'd be happy.

    --Mnem

  182. Java's problems are not limited to performance by Ars-Fartsica · · Score: 2
    Java's syntax is ridiculously verbose. I understand having some degree of verbosity is useful for maintaining legibility, but come on, Java's syntax is over the top with respect to this.

    While I prefer perl's compact syntax, I think for most people Python offers a useful comprimise.

    Writing code in Java is only going to get you RSI.

  183. Re:Language Bloat - parent is funny and stuff! by cosmic+heat+death · · Score: 1

    you know it

    --

    "Smart companies save money by deploying MySQL instead of Oracle." - slashdot post
  184. It appears .Net is proprietary "global bytecode" by Ars-Fartsica · · Score: 2

    From what I can gather of the nebulous .Net architecture, MS essentially has developed bindings for most major languages (or plans to), unfortunately, its proprietary, its vapor, and it will likely suck in any case.

  185. Unfortunately, learning Eiffel is a waste of time by Ars-Fartsica · · Score: 1
    You probably already have learned that the best programming languages are not necessarily the most popular. Eiffel is a great example of this.

    You could go over the docs, download SmallEiffel, and crank out some code, but the fact that you are highly unlikely to use it in a useful manner.

    The mindshare for Eiffel is miniscule to nonexistant, and its opportunity to make an impact on the language scene came and went many years ago.

    Basically, its a dead language.

  186. Re:What I like about Java and where I hope it goes by scottbell · · Score: 1

    Java being "a user's nightmare speed wise" is a oft repeated myth. Server stuff (which the language is predominately used for now) is quite quick. The latest IBM VM is as fast and sometimes faster than C++, not to mention infinitely more maintainable. Plus, the Just-in-time compilers really zoom. The only area Java really lags speedwise is in the GUI, something that seems to be getting considerable attention at Sun. I find it difficult to believe Internet C++ will go anywhere. C++'s syntax is clumsy and pointers lead to truly hellish large coding projects.

  187. This is great. by small_dick · · Score: 2

    After the recent post about the amiga DE, a multiplatform SDK than uses a VM and platform independent machine code, I was a bit concerned that there would be no open alternative.

    This is so cool. Code that fulfills the promise of write once/core everywhere.

    --


    Treatment, not tyranny. End the drug war and free our American POWs.
    See my user info for links.