D is our last hope

jmh530 john.michael.hall at gmail.com
Tue Dec 19 21:42:40 UTC 2023


On Tuesday, 19 December 2023 at 19:20:30 UTC, Walter Bright wrote:
> On 12/19/2023 7:14 AM, jmh530 wrote:
>[snip]
>> I'm also confused why we can't come to some kind of agreement 
>> on issue 23479 [1]. That played out back in February and has 
>> been crickets since then.
>> 
>> [1] https://issues.dlang.org/show_bug.cgi?id=23479
>
> This is because there are people who have .h files mixed in 
> with their .d files along the import search path, and the 
> resulting confusion about which file gets imported.

I understand that. My point was just that still hasn't been 
resolved.

Steve suggested a separate import path flag for C imports. He 
explained [1]:

> For instance, if you want both C and D files imported from 
> directory a/b/c, you would do -Ia/b/c -CIa/b/c. If you only 
> wanted D files, you do -Ia/b/c. If you only wanted C files you 
> do -CIa/b/c. If you wanted C files first, and then D files, you 
> do -CIa/b/c -Ia/b/c.

You said it was a good idea and that it could work, but then you 
gave another approach of putting files with duplicate names on 
the command line to override search pattern behavior. Iain said 
that can lead to duplicate symbols. And the discussion petered 
out.


[1] 
https://github.com/dlang/dmd/pull/14864#issuecomment-1432080786


More information about the Digitalmars-d mailing list