--- Comment #68 from Walter Bright <> 2012-05-07 
12:17:19 PDT ---
(In reply to comment #66)
> (In reply to comment #63)
> > > Can't this be solved by simply making all struct parameters to the in/out
> > > functions ref?
> > 
> > Losing all C ABI compatiblity in the process.
> Contracts don't exist in C - so what's there to lose?

1. pass by ref is semantically very different from pass by value. It is
necessary to support both.

2. D supports using C calling conventions, including having contracts on
functions callable from C.

> > How do you forward a variadic function? You don't know what's on the stack 
> > to
> > forward.
> How do you implement a variadic function at all without knowing this?

See printf, an example of where such knowledge is known by the programmer, not
the language semantics.

Just for fun, I suggest you try to implement a "myprintf" function which
forwards all its arguments to printf.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to