[Haskell-cafe] Re: Pure Haskell Printf
Andreas Rossberg
rossberg at ps.uni-sb.de
Tue Nov 16 07:57:08 EST 2004
Keean Schupke wrote:
>>
> I of course meant strongly-typed, you cannot pass a pointer to an int
> where a pointer
> to a float is required ... modern C compilers require you to explicitly
> cast.
According to the C standard,
void f(float *p) { *p + 1.0; }
void g(void *p) { f(p); }
void h(int n) { g(&n); }
is perfectly valid (though undefined).
> Where
> it fell down was all that automatic type promotion, and providing unsafe
> casts.
And other things, like unions, varargs, etc. Not to speak of subtyping
in C++...
> There is now a typesafe 'C', but I can't remember what it is called -
> presumably it uses some kind of linear-alias typing to make pointers safe.
Do you mean Cyclone?
http://www.research.att.com/projects/cyclone/
Cheers,
- Andreas
--
Andreas Rossberg, rossberg at ps.uni-sb.de
Let's get rid of those possible thingies! -- TB
More information about the Haskell-Cafe
mailing list