Is D a cult?

retard re at tard.com.invalid
Mon Mar 8 04:49:01 PST 2010


Mon, 08 Mar 2010 04:42:48 -0800, Walter Bright wrote:

> grauzone wrote:
>> Again, I can't understand. Does the compiler rely that tuples have the
>> same byte layout as structs or function arguments? I thought the
>> compiler could just copy all fields. And the backend can already return
>> multiple values, since it can return structs and static arrays.
> 
> A tuple and a struct composed of the same tuple should be
> interchangeable.
> 
> This doesn't work, because the alignment is different for different
> circumstances.

Where does this requirement come from? Is there some existing work on 
some other language that tells one to implement it this way? A struct can 
have all kinds of aligments. The developer is able to choose this in a 
systems programming language. Implicit conversion from a tuple type to a 
arbitrary struct sounds like a flaw. Why are so many implicit conversions 
needed?



More information about the Digitalmars-d mailing list