[Issue 18385] [REG 2.079] method cannot be overloaded with another extern(C) method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 23 18:32:03 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18385

Jesse Phillips <Jesse.K.Phillips+D at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D at gmail.co
                   |                            |m

--- Comment #7 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> ---
So C clearly doesn't support function overloads, but D provides for better type
checking and generally expects as much.

I think it would be nice to allow D to specify function overloads if the C call
is ultimately the same (parameter sizes and such).

This way in D a function can be specified to accept pointer types of A, B, and
C rather than needing to be a void* as it is defined in C. I think it is
similar to marking a parameter const even though it has no meaning to C and
isn't actually enforced. This also appears to be how DWT has utilized
definitions.

I've realized that my upgrade to dxml and DWT for an application has cause my
application to not compile on any of the D compilers, so a solution here would
be nice or for [18475] to be fixed on 2.078.

18475: https://issues.dlang.org/show_bug.cgi?id=18475

--


More information about the Digitalmars-d-bugs mailing list