help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'


From: Emanuel Berg
Subject: Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Sat, 31 Dec 2022 00:03:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams wrote:

>> Applicative order AKA strict evaluation: a function is
>> undefined if any of its arguments are.
>> 
>> So in practice, that means they are computed first.
>> 
>> And that makes sense! Since a function f(x, y) is very much
>> a function of x and y ...
>
> Uh, being a function of x and y doesn't imply that both
> x and y always need to be known (calculated).
>
> `if' is a function of all of its args, but in some cases it
> need not evaluate all of them.

Not unlike the Stanley Cup Playoffs - they are best-of-7, not
first-to-4.

Or wait ... should it be the other way around?

> Same with `*': if one of the args is zero then no need to
> calculate the others. Etc.

`or' short-circuiting for that matter.

> To make normal order etc. evaluation efficient you need to
> make it _fully_ lazy: don't copy or evaluate the same
> expression multiple times, but use graph reduction
> (sharing) instead.

Disintegrate everything to fragments.

Filter out duplicates and compute.

Put it back together, with copies for the blanks?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]