D needs to be honest

Jonathan Marler johnnymarler at gmail.com
Mon Oct 29 07:17:17 UTC 2018


On Monday, 29 October 2018 at 06:12:06 UTC, Joakim wrote:
> On Monday, 29 October 2018 at 04:58:09 UTC, Jonathan Marler 
> wrote:
>> I filed this issue 
>> (https://issues.dlang.org/show_bug.cgi?id=18517) about 8 
>> months ago.  It provides a couple test cases that show that 
>> import order changes the semantics of D programs and the order 
>> in which modules are passed to the compiler also changes 
>> semantics.  This behavior has existed long enough that it's 
>> probably time for D to remove and/or qualify some of its 
>> claims.  Statements like:
>>
>> https://dlang.org/spec/module.html
>>
>>> The order in which ImportDeclarations occur has no 
>>> significance.
>>
>>> The order in which modules are imported does not affect the 
>>> semantics.
>>
>> The bugzilla issue above shows cases where these statements 
>> are demonstrated to be false, and I wouldn't characterize the 
>> issue as a bug, rather, a fundamental problem with the way D 
>> handles module imports.  The language definition as it exists 
>> does not allow import order to be invariant.  Note there are a 
>> number of ways to fix this issue (see PRs below) but note that 
>> they do require changes to the way D handles imports.
>>
>>> The semantics of a module are not affected by what imports it.
>>
>> The module name and or the namespace it exists in will change 
>> depending on how the module is imported.  It can change 
>> depending on if it was passed in on the command line, or 
>> loaded from an import by another module, and the path from 
>> which it was loaded can change depending on which module 
>> loaded it first.
>>
>> Based on the response of my pull requests to fix these issues, 
>> its clear that these issues are low on the priority list. This 
>> is fine and maybe it's better that the maintainers focus on 
>> other things rather than this problem, however, I think it's 
>> been long enough that keeping these claims on the website and 
>> in the documentation is bordering on being deceptive and 
>> unethical.  Everyone will have an opinion on where you draw 
>> the line, but in my opinion, it's time to come clean.
>>
>> I've included my pull requests related to these issues.  Feel 
>> free to look into them if you want more information.
>>
>> Relevant Pull Requests:
>>
>> Fix module/import order invariance: 
>> https://github.com/dlang/dmd/pull/7900
>> Interpret imports the same regardless of other modules passed 
>> on the command line: https://github.com/dlang/dmd/pull/7878
>> Add broken import order invariance tests: 
>> https://github.com/dlang/dmd/pull/8165
>> Deprecate import/module name mismatch (ALL CASES): 
>> https://github.com/dlang/dmd/pull/7778
>
> Took a look at all four PRs, all of which were closed by you. I 
> don't know why you linked all of them, since dmd/7900 seems to 
> be the latest one with all the changes. Walter did review #7900 
> earlier this year, but you probably got frustrated when your 
> subsequent ping was not answered.
>
> A better approach would have been to find other dmd reviewers 
> capable of understanding your pull and have them review it. I 
> understand it can be frustrating to have your work just sit 
> there, as I've had the same happen with my much smaller 
> druntime pulls before, but you have to understand that reviewer 
> time is stretched thin.
>
> The fact that Walter took the time to review your pull suggests 
> there is demand for it, nothing is stopping you and other 
> reviewers from getting it in.

In this case I believe I was told that Walter would need to 
approve it. Andrei said that him and Walter discussed this issue. 
They rejected my initial solutions and accepted this one that 
Andrei and I came up with, but the PR just sat there for months. 
But, I'm not posting this to say they need to change their 
priorities, that's their decision but to leave up these 
demonstrably false claims on the site, now with no plan for a 
solution is deceptive. Especially when its a fundamental problem 
with the language and not just an implementation bug. Though I'm 
not sure that Walter ever understood this, he doesnt engage much 
with me so Im not sure what he does or doesn't understand.

As for contributing, this is off th point but I feel I should 
address what you said. Though my experience has been frustrating, 
thats not the reason I stopped working on D. I can deal with 
frustration, but I can't fix apathy and disengagement. When you 
have dozens of pull requests, dozens of hours of work and go 
months with virtually no response, you realize how much time 
you're wasting. I had more branches ready to submit but never did 
because I didnt want to delay my current changes even longer. I 
just kept working more and more until realized that I had to 
stop. Even though I very much enjoyed the work I was doing, it 
felt almost unhealthy to continue. I still do alot of work, it's 
just that now I do it for organizations that can handle it and 
for myself. Maybe D will get better about this one day? I hope it 
does. The language will die of it doesnt. Based on forum 
activity, it feels like its stagnating but thats just a 
feeling...hopefully I'm wrong


More information about the Digitalmars-d mailing list