DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1001.md
Abstract
A DoExpression do(x,y,z) is exactly equivalent to a CommaExpression
(x,y,z), but doesn't emit a deprecation warning.
==
First community DIP has just landed the review que
On 04/09/2016 2:20 AM, Dicebot wrote:
DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1001.md
Abstract
A DoExpression do(x,y,z) is exactly equivalent to a CommaExpression
(x,y,z), but doesn't emit a deprecation warning.
==
First comm
On Saturday, 3 September 2016 at 14:20:28 UTC, Dicebot wrote:
DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1001.md
Abstract
A DoExpression do(x,y,z) is exactly equivalent to a
CommaExpression
(x,y,z), but doesn't emit a deprecation warning.
On Saturday, 3 September 2016 at 14:25:49 UTC, rikki cattermole
wrote:
I propose a slight change:
do(x, y, return z)
Hmm, I suppose I should mention one other motivation behind this
DIP:
I really like to avoid using the 'return' keyword inside
expressions, because I find it visually confusi
On 04/09/2016 2:42 AM, Cauterite wrote:
On Saturday, 3 September 2016 at 14:25:49 UTC, rikki cattermole wrote:
I propose a slight change:
do(x, y, return z)
Hmm, I suppose I should mention one other motivation behind this DIP:
I really like to avoid using the 'return' keyword inside expressio
On Saturday, 3 September 2016 at 14:26:30 UTC, Stefan Koch wrote:
Introducing an expression for this seems overkill.
The same could be said for the '=>' lambda syntax. Doesn't do
anything that {return x;} can't do.
On Saturday, 3 September 2016 at 14:47:50 UTC, rikki cattermole
wrote:
I may dislike not using return but please consider at the very
least using ; instead of , for the last element do(x, y ; z).
Just something to hint that the last one is special.
Not a bad idea, actually. I feel like the sem
On 9/3/16 4:20 PM, Dicebot wrote:
DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1001.md
Abstract
A DoExpression do(x,y,z) is exactly equivalent to a CommaExpression
(x,y,z), but doesn't emit a deprecation warning.
==
First communit
On 9/3/16 4:26 PM, Stefan Koch wrote:
The same can be already achieved using a function literal.
Even better! -- Andrei
On Saturday, September 03, 2016 14:42:34 Cauterite via Digitalmars-d wrote:
> On Saturday, 3 September 2016 at 14:25:49 UTC, rikki cattermole
>
> wrote:
> > I propose a slight change:
> > do(x, y, return z)
>
> Hmm, I suppose I should mention one other motivation behind this
> DIP:
>
> I really lik
On Saturday, September 03, 2016 17:20:28 Dicebot via Digitalmars-d wrote:
> DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1001.md
>
> Abstract
>
>
> A DoExpression do(x,y,z) is exactly equivalent to a CommaExpression
> (x,y,z), but doesn't emit a deprecation warning.
>
> =
On 9/3/16 4:49 PM, Cauterite wrote:
On Saturday, 3 September 2016 at 14:26:30 UTC, Stefan Koch wrote:
Introducing an expression for this seems overkill.
The same could be said for the '=>' lambda syntax. Doesn't do anything
that {return x;} can't do.
Lambdas are a matter of frequency. -- And
On Saturday, 3 September 2016 at 15:28:36 UTC, Andrei
Alexandrescu wrote:
What's wrong with:
auto seq(T...)(auto ref T vals) { return vals[$ - 1]; }
Well there's nothing *wrong* with that, but I really think that
'do' is the perfect word for this purpose, and the fact that it's
already a key
On 9/3/16 6:10 PM, Jonathan M Davis via Digitalmars-d wrote:
I think that we're much better off just killing it off.
We're better off with what we have right now: you can use comma, just
don't take the last value.
Absent a smoking gun (and one very smokey and stinky at that), I don't
see th
On 9/3/16 6:19 PM, Cauterite wrote:
On Saturday, 3 September 2016 at 15:28:36 UTC, Andrei Alexandrescu wrote:
What's wrong with:
auto seq(T...)(auto ref T vals) { return vals[$ - 1]; }
Well there's nothing *wrong* with that, but I really think that 'do' is
the perfect word for this purpose, a
On Saturday, 3 September 2016 at 16:10:16 UTC, Jonathan M Davis
wrote:
.. and from what I've seen, it seems to be the case that just
about only the only folks who read it correctly are the ones
who use it frequently ..
You know what else is easy to misread?
{
x;
y;
return z;
}();
On Saturday, 3 September 2016 at 16:28:15 UTC, Andrei
Alexandrescu wrote:
This is a terrible argument. It has "why not" all over it. --
Andrei
Sorry, it's my first time proposing a language feature.
On Saturday, 3 September 2016 at 16:03:39 UTC, Jonathan M Davis
wrote:
So, instead of having the return statement which everyone knows
to look for and is easy to grep for, you want to add a way to
return _without_ a return statement?
I think you've misunderstood. Even with DoExpressions, the o
On 9/3/16 6:39 PM, Cauterite wrote:
On Saturday, 3 September 2016 at 16:28:15 UTC, Andrei Alexandrescu wrote:
This is a terrible argument. It has "why not" all over it. -- Andrei
Sorry, it's my first time proposing a language feature.
My DConf 2016 talk has a few considerations on what makes
On 03.09.2016 17:28, Andrei Alexandrescu wrote:
What's wrong with:
auto seq(T...)(auto ref T vals) { return vals[$ - 1]; }
- The name (I'd expect that function to return vals).
- Does not work if one or more arguments is of type 'void'. (Arguably
that's just a language misdesign.)
On 9/3/16 12:03 PM, Jonathan M Davis via Digitalmars-d wrote:
On Saturday, September 03, 2016 14:42:34 Cauterite via Digitalmars-d wrote:
On Saturday, 3 September 2016 at 14:25:49 UTC, rikki cattermole
wrote:
I propose a slight change:
do(x, y, return z)
Hmm, I suppose I should mention one o
On 06.09.2016 16:12, Steven Schveighoffer wrote:
I'm not sure I agree with the general principal of the DIP though. I've
never liked comma expressions, and this seems like a waste of syntax.
Won't tuples suffice here when they take over the syntax? e.g. (x, y,
z)[$-1]
(Does not work if x, y or
On 9/6/16 10:17 AM, Timon Gehr wrote:
On 06.09.2016 16:12, Steven Schveighoffer wrote:
I'm not sure I agree with the general principal of the DIP though. I've
never liked comma expressions, and this seems like a waste of syntax.
Won't tuples suffice here when they take over the syntax? e.g. (x,
On 9/6/16 1:01 PM, Timon Gehr wrote:
On 06.09.2016 17:23, Steven Schveighoffer wrote:
On 9/6/16 10:17 AM, Timon Gehr wrote:
On 06.09.2016 16:12, Steven Schveighoffer wrote:
I'm not sure I agree with the general principal of the DIP though. I've
never liked comma expressions, and this seems li
On 06.09.2016 17:23, Steven Schveighoffer wrote:
On 9/6/16 10:17 AM, Timon Gehr wrote:
On 06.09.2016 16:12, Steven Schveighoffer wrote:
I'm not sure I agree with the general principal of the DIP though. I've
never liked comma expressions, and this seems like a waste of syntax.
Won't tuples suf
On Tuesday, 6 September 2016 at 17:01:28 UTC, Timon Gehr wrote:
There can be no field (or variables) of type 'void'.
(void,void,T) has two fields of type 'void'.
Just fixing the limitations is also not really possible, as
e.g. void* and void[] exploit that 'void' is special and have a
non-com
On 07.09.2016 14:19, Marc Schütz wrote:
On Tuesday, 6 September 2016 at 17:01:28 UTC, Timon Gehr wrote:
There can be no field (or variables) of type 'void'. (void,void,T) has
two fields of type 'void'.
Just fixing the limitations is also not really possible, as e.g. void*
and void[] exploit tha
27 matches
Mail list logo