[fpc-devel] Pure function Wiki page

J. Gareth Moreton gareth at moreton-family.com
Mon Jul 9 18:30:18 CEST 2018


Admittedly I have slightly selfish reasons for my proposed improvements.  I like
to play around with mathematical programming where loops can run for several days
or weeks, so even the slimmest of savings adds up to a lot of saved time... and I
love Object Pascal! Granted I can use assembly language for the most critical of
code, something that 64-bit Visual C++ makes extremely difficult (plus there are
always portability issues), but the more you can use a high-level language, the
better.

Ideally, any mathematical function should be eligible for being pure, which is
why I listed factorial as a goal.  There will always be exceptions, of course,
but that seems like a good benchmark.

Gareth aka. Kit

On Mon 09/07/18 15:39 , Ryan Joseph ryan at thealchemistguild.com sent:
> 
> 
> 
> 
> > On Jul 9, 2018, at 3:25 AM, Sven Barth via
> fpc-devel  wrote:
> > 
> 
> > It would allow you to declare constants that use
> those functions with the compiler evaluating them at compile time. 
> 
> 
> That’s a double win then. Very good idea this is.
> 
> 
> 
> Regards,
> 
> Ryan Joseph
> 
> 
> 
> _______________________________________________
> 
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
> 
> 
> 
> 




More information about the fpc-devel mailing list