On Friday, April 20, 2018 19:36:57 Steven Schveighoffer via Digitalmars-d
wrote:
> On 4/20/18 5:40 PM, Jonathan M Davis wrote:
> > On Friday, April 20, 2018 16:35:43 Steven Schveighoffer via
> > Digitalmars-d
> >
> > wrote:
> >> On 4/17/18 4:49 PM, Steven Schveighoffer wrote:
> >>> On 4/17/18
On Friday, April 20, 2018 19:27:20 Steven Schveighoffer via Digitalmars-d
wrote:
> On 4/20/18 6:46 PM, Giles Bathgate wrote:
> > On Friday, 20 April 2018 at 22:21:13 UTC, Jonathan M Davis wrote:
> >> Honestly, I think that it's a terrible idea to special-case it like
> >> that. If we want to
On 4/20/18 7:21 PM, Giles Bathgate wrote:
On Friday, 20 April 2018 at 23:13:58 UTC, Jonathan M Davis wrote:
Yes. That should work. e.g. this
import std.stdio;
void foo(lazy string l)
{
}
void main()
{
foo({writeln("foo"); return "str";}());
}
compiles and runs just fine without printing
On 4/20/18 5:40 PM, Jonathan M Davis wrote:
On Friday, April 20, 2018 16:35:43 Steven Schveighoffer via Digitalmars-d
wrote:
On 4/17/18 4:49 PM, Steven Schveighoffer wrote:
On 4/17/18 12:18 PM, Nick Treleaven wrote:
Thanks for making this pull, I've thought about solving this before. I
think
On 4/20/18 6:46 PM, Giles Bathgate wrote:
On Friday, 20 April 2018 at 22:21:13 UTC, Jonathan M Davis wrote:
Honestly, I think that it's a terrible idea to special-case it like
that. If we want to argue for making it work in the language, that's
fine, but if we special-case it like this, then
On Friday, 20 April 2018 at 23:13:58 UTC, Jonathan M Davis wrote:
Yes. That should work. e.g. this
import std.stdio;
void foo(lazy string l)
{
}
void main()
{
foo({writeln("foo"); return "str";}());
}
compiles and runs just fine without printing anything, whereas
you get a compilation
On Friday, April 20, 2018 22:46:54 Giles Bathgate via Digitalmars-d wrote:
> On Friday, 20 April 2018 at 22:21:13 UTC, Jonathan M Davis wrote:
> > Honestly, I think that it's a terrible idea to special-case it
> > like that. If we want to argue for making it work in the
> > language, that's fine,
On Friday, 20 April 2018 at 22:21:13 UTC, Jonathan M Davis wrote:
Honestly, I think that it's a terrible idea to special-case it
like that. If we want to argue for making it work in the
language, that's fine, but if we special-case it like this,
then it will work with some functions that have
On Friday, April 20, 2018 22:03:04 Giles Bathgate via Digitalmars-d wrote:
> On Friday, 20 April 2018 at 20:35:43 UTC, Steven Schveighoffer
>
> wrote:
> > Let me say I was surprised that this doesn't actually work. An
> > in-line lambda will NOT work as a lazy parameter, even though
> > that's
On Friday, 20 April 2018 at 20:35:43 UTC, Steven Schveighoffer
wrote:
Let me say I was surprised that this doesn't actually work. An
in-line lambda will NOT work as a lazy parameter, even though
that's EXACTLY what a lazy parameter is implemented as! And
variadic lazy parameters are
On Friday, April 20, 2018 16:35:43 Steven Schveighoffer via Digitalmars-d
wrote:
> On 4/17/18 4:49 PM, Steven Schveighoffer wrote:
> > On 4/17/18 12:18 PM, Nick Treleaven wrote:
> >> Thanks for making this pull, I've thought about solving this before. I
> >> think the function needs to provide a
On 4/17/18 4:49 PM, Steven Schveighoffer wrote:
On 4/17/18 12:18 PM, Nick Treleaven wrote:
Thanks for making this pull, I've thought about solving this before. I
think the function needs to provide a way to tell if the value was
already present.
Not as straightforward, but it can be done:
12 matches
Mail list logo