On 6/11/18 2:23 PM, Timon Gehr wrote:
On 11.06.2018 20:15, Steven Schveighoffer wrote:
On 6/11/18 10:43 AM, Timon Gehr wrote:
On 11.06.2018 16:39, Timon Gehr wrote:
FeepingCreature's example does not really qualify as a do-nothing
loop, because the loop produces a value that you
On 11.06.2018 20:15, Steven Schveighoffer wrote:
On 6/11/18 10:43 AM, Timon Gehr wrote:
On 11.06.2018 16:39, Timon Gehr wrote:
FeepingCreature's example does not really qualify as a do-nothing
loop, because the loop produces a value that you (presumably) later
access.
Hm, ok. The problem
On 6/11/18 10:43 AM, Timon Gehr wrote:
On 11.06.2018 16:39, Timon Gehr wrote:
FeepingCreature's example does not really qualify as a do-nothing
loop, because the loop produces a value that you (presumably) later
access.
Hm, ok. The problem is actually there, but it is not that the 'find'
On 11.06.2018 16:39, Timon Gehr wrote:
FeepingCreature's example does not really qualify as a do-nothing loop,
because the loop produces a value that you (presumably) later access.
Hm, ok. The problem is actually there, but it is not that the 'find'
call will get removed, it is that the
On 08.06.2018 01:14, Steven Schveighoffer wrote:
No matter what is inside fn, it will return S.init, if it returns. The
question to answer is, can we assume all functions don't enter infinite
loops, and if we can assume this, then why couldn't the compiler simply
replace a call to fn with
On 6/7/18 6:57 PM, Stefan Koch wrote:
On Thursday, 7 June 2018 at 22:23:09 UTC, Steven Schveighoffer wrote:
{...}
That a function could return does not mean it will.
int fn (int arg) /*strongly*/ pure
{
if (arg == 42)
return 42;
else (arg < 43)
return fn(--arg);
else
On Thursday, 7 June 2018 at 22:23:09 UTC, Steven Schveighoffer
wrote:
{...}
That a function could return does not mean it will.
int fn (int arg) /*strongly*/ pure
{
if (arg == 42)
return 42;
else (arg < 43)
return fn(--arg);
else
return fn(++arg);
}
do you see the problem?
On 6/7/18 5:04 PM, Jonathan M Davis wrote:
On Thursday, June 07, 2018 20:14:19 Johan Engelen via Digitalmars-d wrote:
On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote:
I'm just posting to clear up the misunderstanding that a call
to a pure function can be removed. Actually, even
On Thursday, June 07, 2018 20:14:19 Johan Engelen via Digitalmars-d wrote:
> On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote:
> > I'm just posting to clear up the misunderstanding that a call
> > to a pure function can be removed. Actually, even calls to
> > strongly pure functions
On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote:
I'm just posting to clear up the misunderstanding that a call
to a pure function can be removed. Actually, even calls to
strongly pure functions cannot always be removed. This is
because there is one thing that a pure function can
On 6/5/18 5:03 PM, FeepingCreature wrote:
On Tuesday, 5 June 2018 at 17:47:15 UTC, Steven Schveighoffer wrote:
Another observation: under the "infinite loops are important
observable behavior" world-view, pure functions cannot be lazily
evaluated either:
pure int foo() { /*infinite loop */}
On Tuesday, 5 June 2018 at 17:47:15 UTC, Steven Schveighoffer
wrote:
Another observation: under the "infinite loops are important
observable behavior" world-view, pure functions cannot be
lazily evaluated either:
pure int foo() { /*infinite loop */}
void main(string[] args)
{
auto a =
On 6/5/18 10:48 AM, FeepingCreature wrote:
I'm just posting to clear up the misunderstanding that a call to a pure
function can be removed. Actually, even calls to strongly pure functions
cannot always be removed. This is because there is one thing that a pure
function can do that will change
On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote:
I'm just posting to clear up the misunderstanding that a call
to a pure function can be removed. Actually, even calls to
strongly pure functions cannot always be removed. This is
because there is one thing that a pure function can
I'm just posting to clear up the misunderstanding that a call to
a pure function can be removed. Actually, even calls to strongly
pure functions cannot always be removed. This is because there is
one thing that a pure function can do that will change program
behavior if it is removed, even if
15 matches
Mail list logo