Philosophy of how OS API imports are laid out in druntime

Iain Buclaw ibuclaw at gdcproject.org
Thu Mar 6 15:56:25 PST 2014


On 6 March 2014 23:46, Sean Kelly <sean at invisibleduck.org> wrote:
> On Thursday, 6 March 2014 at 22:53:40 UTC, Walter Bright wrote:
>>
>>
>> 4. Attempts to eliminate code duplication in OS api interface modules. A
>> desire to do this comes up repeatedly. I can expand on this if anyone
>> remains unconvinced :-)
>
>
> I 100% agree with this.  Trying to avoid code duplication here
> leads to madness.

Indeed, I don't recall a single port-related pull in the last several
months that tried to do any refactoring.  I think the general
consensus among the current mantainers is that explicit versioning is
good, vague/fallback else is bad.  However on the flip side, the more
ports you add into one single file, the more you descend back into the
madness you were initially trying to avoid.

I hope code duplication in many files rather than one file is in the
interest of everyone. :)


More information about the Digitalmars-d mailing list