REVIEW - Java 2&JavaScript for C and C++ Programmers (rev ed)


Title:

Java 2&JavaScript for C and C++ Programmers (rev ed)

Author:

Daconta et al.

ISBN:

0471327190

Publisher:

Wiley ()

Pages:

868pp+CD

Reviewer:

Francis Glassborow

Reviewed:

August 1999

Rating:

★★☆☆☆


I guess the revised edition is because it now treats Java 2. Java must have the record for the rate at which books are written about it coupled with the rate at which the language changes. As I write this news has just broken that Sun has decided not to submit Java for standardisation via the PAS process. Apparently they have finally understood what most of us have known for years that once the language becomes an ISO standard, ISO is responsible for revisions, corrections and enhancements. I think this means that we can expect further fragmentation and incompatible implementations. Curiously we still have books such as this one that refer to something called JavaScript. The curiosity is that there is a standard for ECMAscript which is the open name for that language but no one seems willing to use it.

Actually only the final two chapters are about JavaScript and I am going to skip comment on these because your decision to buy this book will certainly be based on the previous 800+ pages.

The book starts with a chapter introducing Java and its standard tools. Next we have two chapters comparing Java in turn with C and C++. Considering the title of this book I would have expected much more focus on the facilities that either C or C++ provides that Java does not (or that Java provides in a very different way). I think this flaw (well I think it is) is because the authors are heavily focused on Java. Their knowledge of C/C++ seems weak. For example on page 153 they write about anonymous classes in C++. The examples clearly show that they do not know the difference between an anonymous union in C++ and an unnamed class (whose existence is purely to support the C usage of unnamed structs.) The next chapter (4) is about features of Java that are not in C/C++. I have no problems with this but I emphasise that I would have welcomed chapters on the reverse relationship.

Chapter 5 deals with connecting to legacy code. This is mainly about the Java Native Interface. The next 550 pages is dedicated to pure Java.

This book is a reasonable introduction to Java but I think its title promises rather more. I would have liked to have seen a much more thorough study of the ways in which the languages differ. If you are an average C++ programmer you would probably do better to learn Java from scratch (being told to forget anything you thought you knew about C++). Only good C++ programmers should even consider relating Java to C++, and these will want far more than they will find here. Good C programmers need a very different style of introduction. Their low level coding methods will largely port to Java but they will need far more on the principles of encapsulation, access specifiers etc.

I think the authors fell into a common trap by lumping C and C++ programmers together (actually C and C++ programmers frequently make the same mistake). The very similarities between the three languages are the greatest dangers. Code sometimes silently changes its meaning when it is ported between languages, and idioms frequently do not port effectively.

This is not a bad book but it could/should have been so much more.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.