www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Is D right for me?


 The way varargs works for the C ABI is inefficient, clumsy, and frankly won't 
 work for what D needs. So I'm going to have two varargs - one for extern (C) 
 which is compatible with the C ABI and one for extern (D) which will push
 on the stack as for 32 bits.

Recently I have seen something related on Reddit: http://blog.nelhage.com/2010/10/amd64-and-va_arg/ http://www.reddit.com/r/programming/comments/dmm05/til_va_arg_on_amd64_is_way_more_complex_than_i/
 The only remaining nuisance for the D method is that some types have to be 
 aligned more strictly than the stack. That means TypeInfo will have to be 
 extended to provide an alignment size for the type.

Is this somewhat related to this enhancement request "Guarantee alignment of stack-allocated variables on x86"? http://d.puremagic.com/issues/show_bug.cgi?id=2278 Bye, bearophile
Oct 11 2010