Proposal: Don't require users to use undefined

Axel Simon Axel.Simon at
Wed Oct 27 06:12:42 EDT 2010

On 27.10.2010, at 11:49, Henning Thielemann wrote:

> Axel Simon wrote:
>> I do not see the problem that anybody is every going to  
>> accidentally evaluate sizeOf or alginment and get an unexpected  
>> "undefined" value back. I don't see the compiler optimization  
>> problem - it may exists but if the argument of Storage is fixed  
>> (and it always is in any use of Storage) then the compiler should  
>> be able to inline the 4 or 8 or whatever alignment evaluates to.
> I like to repeat my example here:
>  sizeOf (a,b) = sizeOf a + sizeOf b

The point was that I assume that the usual use case is to marshal C  
structs where you would only use sizeOf in very specific patterns that  
do not include your example (or would you ever allocate memory to  
serialize two C structs, one after the other?).


More information about the Libraries mailing list