www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15587] New: Enable use of D keywords as identifiers when


          Issue ID: 15587
           Summary: Enable use of D keywords as identifiers when
                    interfacing to C/C++
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com


    extern (C) int* with();

where delegate is a C function name. This, of course, fails because 'with' is a
D keyword. A solution is:

    extern (C) int* with_();

and have the C/C++ name mangler remove any trailing _ from identifiers.

The prefix version, _with, has problems because it would be impossible to have
a C identifier named '_traits' or '_gshared'.

Jan 20 2016