Women in Technology

Hear us Roar



Article:
  10 Reasons We Need Java 3.0
Subject:   Primitive types are needed, but need not prohibit first-class types
Date:   2002-08-06 05:27:23
From:   davecb
Response to: Primitive types are needed!

Actually smalltalk used a simple mechanism
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.