My 1 cent on the matter:

I'm going to give you a list of differences that I know of between Java and
Delphi concerning the programming paradigm. Please note those opinions come
from someone who's only interest in Java is "academic". I never wrote a Java
program and I never intend to. What you'll see in the following list is
stuff that I picked up along the way from blogs, articles, magazines, ng
posts etc. I truly hope someone will comment on those because I'm interested
in the differences myself!

1) All methods in Java are virtual methods. There's a larger selection of
methods kinds in Delphi: static, virtual, dynamic.
2) Everything in Java is an object, including what we commonly call
"simple/ordinal types" (integer, Boolean). Delphi makes a clear distinction
between objects and non-objects. It also has records and pointers.
3) AFAIK Java does not have Interfaces. Delphi does have Interfaces.
4) You can't have "classic" procedures and functions in Java. AFAIK
everything needs to go into a class. Delphi does allow one to have global
procedures and functions (ie: not included in a "class"). 
5) You already mentioned this: Java has garbage collection, Delphi Win32
does not. I don't know how usefull dot net's garbage collection is for
Delphi dot net because I never used that. 

All-in-all I think there are no fundamental incompatibilities between Java
and Delphi. Where the two languages intersect stuff works the same way.
Unfortunately they do not "intersect" in all aspects of programming. I think
any book you'll find on Java will make assumptions about facilities
available (or not available) in the Java language. It will also make
assumptions about the available libraries, the interpreter, garbage
collection. This means you'll be learning Java, not Delphi!

I'd like to recommend you a good OOP book on Delphi but unfortunately most
books I've seen on Delphi make the assumption you don't like typing and want
to drag-and-drop your way into the programming world. That's also misleading
and wrong. Also most of the books I've seen are by Romanian authors on
Romanian bookshelves. Mabe you'll find better bookshelves somewhere :)

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Alan Colburn
> Sent: Wednesday, April 19, 2006 6:33 PM
> To: [email protected]
> Subject: Delphi and Java
> 
> [Not sure whether this message is more appropriate for delphi or delphi-
> talk
> list. Apologies if I chose poorly :) ]
> 
> As a relative newbie, it's hard for me to find Delphi books I really like.
> As an educator, I've found better books on the Java shelves of bookstores
> than the Delphi shelf. So, to better understand the world of OOP, I'm
> going
> to try using the Java bookshelf. I've found a couple books that I think
> are
> well done (Beginning Java Objects and Head First Java, which take rather
> different educational approaches).
> 
> I know that Delphi's object model and Java's are quite similar, with the
> only major difference (for someone at my level) being that Java offers
> garbage collection & Delphi programmers must free objects themselves. I'm
> wondering if there are other things I should be aware of or otherwise
> thinking about when reading a Java book and trying to translate it to
> Delphi?
> 
> Thanks, as always -- Alan C.
> 
> _________________________________________________________________
> On the road to retirement? Check out MSN Life Events for advice on how to
> get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
> 
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi



_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to