Re: Can we deprecate D-style Variadic Functions

2015-03-27 Thread Shammah Chancellor via Digitalmars-d
On 2015-03-26 01:04:03 +, Freddy said: On Thursday, 26 March 2015 at 00:11:05 UTC, Dicebot wrote: On Wednesday, 25 March 2015 at 22:12:04 UTC, Freddy wrote: D-style Variadic Functions found here:http://dlang.org/function.html seem entirely out classed by Variadic Function Templates. Can

Re: Can we deprecate D-style Variadic Functions

2015-03-27 Thread Dicebot via Digitalmars-d
What Shammah has said. Your proposal is not a proper replacement, it has very different effect on a binary. It could be possible to reimplement D-style varargs on top of C-style varargs + manual RTTI usage but not with template variadics.

Re: Can we deprecate D-style Variadic Functions

2015-03-27 Thread deadalnix via Digitalmars-d
On Friday, 27 March 2015 at 14:24:47 UTC, Shammah Chancellor wrote: On 2015-03-26 01:04:03 +, Freddy said: On Thursday, 26 March 2015 at 00:11:05 UTC, Dicebot wrote: On Wednesday, 25 March 2015 at 22:12:04 UTC, Freddy wrote: D-style Variadic Functions found

Re: Can we deprecate D-style Variadic Functions

2015-03-27 Thread Freddy via Digitalmars-d
On Friday, 27 March 2015 at 20:57:51 UTC, Freddy wrote: template VariadicFunction(alias Imp){ auto VariadicFunction(T...)(T args){ void* data=args; TypeInfo[T.length] rtti; foreach(i,type;T){ rtti[i]=typeid(type);

Re: Can we deprecate D-style Variadic Functions

2015-03-27 Thread Freddy via Digitalmars-d
On Friday, 27 March 2015 at 19:59:13 UTC, deadalnix wrote: To be fair, this is most likely going to be inlined an ditched away with any decent optimizer. It wouldn't even need alloca if sizeof and address of worked with tuples. ``` template VariadicFunction(alias Imp){ auto

Re: Can we deprecate D-style Variadic Functions

2015-03-25 Thread Freddy via Digitalmars-d
On Thursday, 26 March 2015 at 00:11:05 UTC, Dicebot wrote: On Wednesday, 25 March 2015 at 22:12:04 UTC, Freddy wrote: D-style Variadic Functions found here:http://dlang.org/function.html seem entirely out classed by Variadic Function Templates. Can we deprecate them? Those are two different

Re: Can we deprecate D-style Variadic Functions

2015-03-25 Thread Idan Arye via Digitalmars-d
On Wednesday, 25 March 2015 at 22:12:04 UTC, Freddy wrote: D-style Variadic Functions found here:http://dlang.org/function.html seem entirely out classed by Variadic Function Templates. Can we deprecate them? Surely you mean they are classed out by Typesafe Variadic Functions? Variadic

Re: Can we deprecate D-style Variadic Functions

2015-03-25 Thread Dicebot via Digitalmars-d
On Wednesday, 25 March 2015 at 22:12:04 UTC, Freddy wrote: D-style Variadic Functions found here:http://dlang.org/function.html seem entirely out classed by Variadic Function Templates. Can we deprecate them? Those are two different concepts with different trade-offs. Using variadic