Thread: Recipie for Java

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    Recipie for Java

    Take C++. Subtract functionality and speed. Add bulkiness. Box all the standard data types in classes that take up 10 times the space that they have to. Allocate everything on the heap. Add bugs to every implementation that exists. Make it a bit easier to use.

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    I'm afraid that Java was written in C/C++.

    With Java you can write an application and migrate it to any platform. You do not have to rewrite the application when you upgrade your operating system. You do not have to rely on vendor interfaces, that's a good thing.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > You do not have to rely on vendor interfaces, that's a good thing.

    That's right - Java's made by all sorts of companies all around the world. Hooray for Java! Wait a minute...

  4. #4
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Java also has built in libraries that support distributed application development. It's loaded with functionality. It's not at all slow if you know what you are doing. Java isn't the answer for everything but it's a very competitive business language, and it's popular. Go and download the 1.4 SDK and than download the 1.4 documentation. You will like it.

  5. #5
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Originally posted by Govtcheez
    > You do not have to rely on vendor interfaces, that's a good thing.

    That's right - Java's made by all sorts of companies all around the world. Hooray for Java! Wait a minute...
    I can't think of any great vendor Windows interface. At least Java is a high quality OOP language. If there were more good libraries though, say a powerful Windows and GDI library with Standard C++ bindings and tons of documentation than I might want to give that a try! I don't see any of that out there. Java actually kicks ass in that department.

  6. #6
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    >Box all the standard data types in classes

    Somebody correct me if I'm wrong, but aren't all standard C++ data types classes?

    I.e. :

    int a(5);

    calls the int copy contructor.

    One thing I hate about Java is lack of unsigned integers. Have you ever tried to write a byte oriented protocol handler in Java? I have. I had to handle negative numbers, which were really unsigned, and do all the mapping, and handle roll around etc. It was horrendous.

    What would be nice is if the ANSI Standards Body produced a new version of C++ without the C part. I would suggest:

    It should no C style functions (C++ only)
    A binman (garbage collector)
    Exception handling like Java
    Retain all the memory/pointer oriented access & control of C
    Compile to binary, not some poxy byte code

    Please don't anyone tell me, oh that's C#.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  7. #7
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    Why would someone learn Java??
    Exept for writting applets?

  8. #8
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Because some places program in it. It's not a bad language once you get into it.

  9. #9
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >Why would someone learn Java??
    >Exept for writting applets?

    Also in the world of embedded systems Java is used a lot. For example, a lot of consumer electronics, like example mobile phones or digital TV's, have a JVM on board on which Java applications are running.

    Java is not suitable for real-time systems, because of the garbage collector process, but it is very suitable to create applications.

  10. #10
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    You cannot deny its popularity. It seems to have been adopted by academia as a good first language to learn, replacing C++ in many cases. And if you ever see any code on television its quite likely to be Java, I saw Antitrust the other night and all the code was Java...

    Its probably a little sad that I was able to recognise it
    Couldn't think of anything interesting, cool or funny - sorry.

  11. #11
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by Davros
    >Box all the standard data types in classes

    Somebody correct me if I'm wrong, but aren't all standard C++ data types classes?

    I.e. :

    int a(5);

    calls the int copy contructor.
    Not to my knowledge, and not with the compilers I use....

    That call means the same as int a = 5;......on 0x86 platforms, they are both usually changed to a single MOV instruction......no constructor calls are used....

    I guess tts allowed to be used like a copy constructor because C++ goes a long way to allow built in and user defined data types to be used the same way

Popular pages Recent additions subscribe to a feed