Don <> changed:

           What    |Removed                     |Added
           Keywords|                            |spec
          Component|websites                    |DMD

--- Comment #3 from Don <> 2012-04-12 12:56:33 PDT ---
(In reply to comment #2)
> extern(C) does not have any effect on parameters. 

Not so. It most definitely does! Doesn't make much difference on Linux, but on
Windows they are quite different. Also variadic functions are defined in the
spec to be different for extern(C) vs extern(D), on all platforms.

> Note that you can easily
> implement extern(C) functions in D (in fact the runtime heavily relies on
> this).

I know, and it worries me. The question is, is that just
implementation-specific behaviour?

> Also note that because C treats fixed-sized array parameters as pointers, and 
> D
> treats them as values, the following idiom has emerged, which would not be
> possible if ref wasn't allowed:
> extern(C) int pipe(ref int[2] fds);

Yeah, and that's nice. But the odd thing is, that is actually implementable in
C. Whereas other things, such as lazy, might not be. The key issue is, should
extern(C) allow signatures that *cannot* be implemented in C?

> Changing to websites, since this is really a spec issue.  The compiler is
> implemented properly IMO.

I agree it is probably a spec issue. Spec issues are normally treated with DMD
+ spec keyword. It is part of the DMD download.

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

Reply via email to