UTF-8 library

Joe English jenglish@flightlab.com
Sat, 10 Aug 2002 10:29:50 -0700


Ashley Yakeley  wrote:
>
> One of the things that really bothers me about C is the way its
> unspecifiedness about types can "infect" other languages. For instance,
> what exactly is a Haskell Int?
>
> Java, at least, stands firm, but then platform-independence was one of
> Java's explicit design priorities.

Platform-independence is *also* one of Standard C's explicit
design goals, it just approaches it in a different way.

Standard C attempts platform independence by specifying the
existence of a certain number of built-in numeric types,
and certain guarantees about each of them.  It requires
that programmers know what is and is not guaranteed, however,
and write code accordingly.  It's possible to write portable
code in C, but you must abandon the assumption that (for
instance) an 'int' is exactly 32 bits, since that's not true
on all platforms.  The slogan is "All the world is not a VAX."

Java attempts platform independence by declaring that all
the world *is*, in fact, a VAX [*].


[*] More precisely, a 32-bit platform with IEEE 754 floating point.

--Joe English

  jenglish@flightlab.com