Am 29.04.2020 um 22:51 schrieb Jonas Maebe:
On 29/04/2020 22:43, J. Gareth Moreton wrote:
So are you officially rejecting pure functions and my future work on
them in this form?
I'm just trying to say that there is already a (primitive) framework for
propagating constant values through functions (in the optconstprop
unit), and also an extensive framework for evaluating constant
expressions (the simplify methods of all nodes), and that hence there
may not be any need to develop a completely new constant evaluation and
propagation framework next to this.
I explained before that I am absolutely no fan of a "pure" attribute,
but that has nothing to do with my remarks here. And no, I will not veto
the inclusion of manual annotations of pure functions.
Assuming we want to have support for constant evaluation of functions
(and I do admit that sometimes that is a really nice to have), I don't
really see a way around marking such functions somehow, cause otherwise
we'd have to store the node trees of all functions that we detect as
pure in the PPU.
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel