Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-23 Thread Andrei Alexandrescu via Digitalmars-d
On 01/22/2016 09:48 AM, Marc Schütz wrote: On Thursday, 21 January 2016 at 20:42:17 UTC, Jack Stouffer wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I disagree. Making an

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-23 Thread Andrei Alexandrescu via Digitalmars-d
On 01/22/2016 09:48 AM, Marc Schütz wrote: On Thursday, 21 January 2016 at 20:42:17 UTC, Jack Stouffer wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I disagree. Making an

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-23 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-22 23:00, Ilya wrote: DIP please! --Ilya http://forum.dlang.org/post/n8024o$dlj$1...@digitalmars.com -- /Jacob Carlborg

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-22 Thread Ilya via Digitalmars-d
On Friday, 22 January 2016 at 17:09:01 UTC, Jacob Carlborg wrote: On 2016-01-21 20:31, Andrei Alexandrescu wrote: [...] Can we just implement a basic form of named parameters that remove the ugly workaround that Flag is. void a(int x); a(x: 3); // error, cannot be called with named paramete

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-22 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-21 20:31, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. Can somebody please c

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-22 Thread Zekereth via Digitalmars-d
On Friday, 22 January 2016 at 14:48:47 UTC, Marc Schütz wrote: On Thursday, 21 January 2016 at 20:42:17 UTC, Jack Stouffer wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-22 Thread Marc Schütz via Digitalmars-d
On Thursday, 21 January 2016 at 20:42:17 UTC, Jack Stouffer wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I disagree. Making an alias means the user does not have to impor

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Andrei Alexandrescu via Digitalmars-d
On 01/21/2016 03:42 PM, Jack Stouffer wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I disagree. Making an alias means the user does not have to import std.typecons in their

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Andrei Alexandrescu via Digitalmars-d
On 01/21/2016 04:58 PM, H. S. Teoh via Digitalmars-d wrote: auto myFunc(T)(T data, Flag!"replaceArrayWithPointer" replaceArrayWithPointer = Flag!"replaceArrayWithPointer".Yes) { ... } auto myFunc(T)(T data, Flag!"replaceArrayWithPointer" flag = Yes.replaceArrayWithPointer)

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 21, 2016 at 08:42:17PM +, Jack Stouffer via Digitalmars-d wrote: > On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: > >* Do NOT alias Flag!"frob" to a new name. This is unnecessary, > >unhelpful, and wasteful. > > I disagree. Making an alias means the user d

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Brad Anderson via Digitalmars-d
On Thursday, 21 January 2016 at 20:42:56 UTC, jmh530 wrote: On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"fro

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread jmh530 via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wastef

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Jack Stouffer via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. I disagree. Making an alias means the user does not have to import std.typecons in their code, and as a purely subjective measure, R

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Guillaume Piolat via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wastef

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Ilya Yaroshenko via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wastef

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Ilya via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wastef

Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Andrei Alexandrescu via Digitalmars-d
The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and wasteful. Can somebody please change the respective code in std.experimental.n