Thread overview
druntime vararg implementation
Nov 05, 2014
Mike
Nov 05, 2014
Sean Kelly
Nov 06, 2014
Mike
Nov 06, 2014
Jonathan M Davis
November 05, 2014
Greetings,

In core.varar. (https://github.com/D-Programming-Language/druntime/blob/master/src/core/vararg.d), why is the X86 implementation singled out and written in D rather than leveraging the standard c library implementation like the others?

Mike
November 05, 2014
On Wednesday, 5 November 2014 at 09:45:50 UTC, Mike wrote:
> Greetings,
>
> In core.varar. (https://github.com/D-Programming-Language/druntime/blob/master/src/core/vararg.d), why is the X86 implementation singled out and written in D rather than leveraging the standard c library implementation like the others?

No idea.  It seems like a pointless duplication of code.  Maybe just to have some documented functions within the module?
November 06, 2014
On Wednesday, 5 November 2014 at 14:24:00 UTC, Sean Kelly wrote:
> On Wednesday, 5 November 2014 at 09:45:50 UTC, Mike wrote:
>> Greetings,
>>
>> In core.varar. (https://github.com/D-Programming-Language/druntime/blob/master/src/core/vararg.d), why is the X86 implementation singled out and written in D rather than leveraging the standard c library implementation like the others?
>
> No idea.  It seems like a pointless duplication of code.  Maybe just to have some documented functions within the module?

In that case, a better question is "Why use the standard C implementation if we have working D code?".
November 06, 2014
On Thursday, November 06, 2014 00:16:48 Mike via Digitalmars-d-learn wrote:
> In that case, a better question is "Why use the standard C implementation if we have working D code?".

Less to maintain. Also, there's less risk of inconsistency with what C is doing. And it's low level stuff anyway where it doesn't really buy us much to implement it ourselves rather than just hooking into the existing C API.

- Jonathan M Davis