2009/2/27 Jonathan S. Shapiro <[email protected]>:
> For example, there are LOTS of procedures out there that accept or
> return an argument of type size_t, which is a platform-specific
> typedef. How should these be typed in BitC?

I believe size_t being a typedef was just an implementation choice,
and it should be handled like C primitive types for maximum
portability. Platform-specific typedefs are often a threat to
portability. (There are lots of typedefs in stdint.h, though.)

On a related note, I have a few questions concerning primitive types:
 - Is it safe to assume that sizeof(Foo*) == sizeof(void*) or is it
just that sizeof(Foo*) <= sizeof(void*)?
 - Should BitC have C-like types to avoid making unnecessary
representation choices? ("I just want a fast and large enough integer,
dammit!")
 - Are BitC programmers stuck with the assumption that data types are
8/16/32/64 bits wide?

I understand that a programmer can create abstractions himself, but a
good collection of standard types is very important for libraries. If
each library defined its own basic types, the user has to do a lot of
unnecessary conversions.

I guess I'm trying to say that there were lots of reasons why C chose
abstract primitive types, and I would like an explanation why BitC did
not. I do like the fact that representation is clearly visible, but it
hinders portability.

Aleksi Nurmi
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to