Primitive Types Considered Harmful

        “100% Java” is the Java developers’ slogan, meaning “Don’t taint your Java software by incorporating non-Java components.” Yet, Java itself is neither 100% pure object or 100% pure object-oriented; it is “tainted” with components of the procedural programming paradigm. The primary goal of this paper is to argue that the decision to incorporate non-object primitive types into Java's otherwise uniform object-oriented language model is a source of problems. By building a world in which objects co-exist with primitive types, and procedural programming constructs co-exist with object-oriented mechanisms, Java offers a single world with a dichotomy of semantics. The paper also, secondarily, offers a solution for the problem.

By: Sherman R. Alpert

Published in: RC21157 in 1998


This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.


Questions about this service can be mailed to .