PDA

View Full Version : Recipie for Java



face_master
10-22-2002, 06:26 AM
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.

Troll_King
10-22-2002, 06:39 AM
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.

Govtcheez
10-22-2002, 06:48 AM
> 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...

Troll_King
10-22-2002, 06:56 AM
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.

Troll_King
10-22-2002, 06:59 AM
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.

Davros
10-22-2002, 07:08 AM
>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#.

ammar
10-22-2002, 10:05 AM
Why would someone learn Java??
Exept for writting applets?

Govtcheez
10-22-2002, 10:16 AM
Because some places program in it. It's not a bad language once you get into it.

Shiro
10-22-2002, 11:40 AM
>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.

endo
10-22-2002, 11:51 AM
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 :)

Fordy
10-22-2002, 01:37 PM
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