[fpc-devel] Pure function Wiki page

Dmitry Boyarintsev skalogryz.lists at gmail.com
Sun Jul 8 21:11:17 CEST 2018


On Sun, Jul 8, 2018 at 1:01 PM, Florian Klämpfl <florian at freepascal.org>
wrote:
>
>
> No. Because pure is part of the function header and tells users "you can
> use this function with constant arguments in constant expressions and this
> won't change without notification". If the compiler determines by itself if
> a function is pure or not, it might even depend on the compiler version if
> a function is detected as pure or not.


Isn't it similar to "overload" keyword?
delphi mode required "overload" keyword for functions, while for objfpc
mode, it's up to the compiler.

(and yes, there were some issues with the compiler failing to determine
what overload function to call from version to version)

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180708/4f12c166/attachment.html>


More information about the fpc-devel mailing list