| Article: |
10 Reasons We Need Java 3.0 | |
| Subject: | Primitive types are needed! | |
| Date: | 2002-08-02 10:12:15 | |
| From: | petilon | |
|
For efficiency we still need primitive types. The article mentions C#, but the much-vaunted "Type System Unification" in C# is broken. See http://www.geocities.com/csharpfaq/box.html Other poor ideas in C# include structs and properties. See critiques section on this site: http://www.geocities.com/csharpfaq/ |
||
Showing messages 1 through 1 of 1.
-
Primitive types are needed, but need not prohibit first-class types
2002-08-06 05:27:23 David Collier-Brown |
[View]



to make operations fast: they started out
running the "primitive" code (ie, machine
code), but if it could not handle one of
the cases, faulted into a more general
interpreted code-block.
This made the common case fast, without blowing
up the general case.
Java, in principle, could have first-class
types with full generality, without sacrificing
performance if the "int" primitive code
was the first code run for all integer
operations, and had a few hooks to the full
class, to be used whenever the primitive code
didn't suffice.