[Coco] A Basic09 Query

Joel Rees joel.rees at gmail.com
Wed Sep 18 15:13:57 EDT 2019


If you want a more general answer, look into implementations of fig-FORTH.

2019年8月27日(火) 5:41 Bill Gunshannon <bill.gunshannon at hotmail.com>:

>
> Nothing important, just a couple simple questions.
>
> Why would you need a function to return a constant, Pi?


Function calls are useful to hide variable accesses, or to wrap them in a
read-only wrapper.

Also, in a small address space, the compile-time parts of the compiler tend
to do less semantic preprocessing -- less optimizing constant expressions
out.

And further, why would you need a function to compute a square?
>

This is guessing, but is it possible that the function was trying to
optimize a little at run time?

Is that not unneeded complexity?
>

Lots of things we used to do because they were convenient then and didn't
require expensive large address spaces and expensive optimizing compilers.


More information about the Coco mailing list