On Wed, Jan 30, 2019 at 5:58 AM oldk1331 <[email protected]> wrote:
>
> On 1/30/19 5:13 PM, Ralf Hemmecke wrote:
> ...
> > In fact, it keeps confusing me.
> >
> > In Aldor, if write something like
> >
> >   foo: % == [1, empty()]
> >   bar(): % == [1, empty()]
> >
> > then in the use of bar() I would expect a new allocation every time
> > bar() is used. But not so for foo. In Aldor bar is a function but foo is
> > a constant (no function call).
>
> I think "foo" and "bar" are the same: the empty parentheses can be omitted.
> They are both functions with no arguments.
>
> The thing matters is that "1" is declared as:
>
>     1 : constant -> %
>
> That makes sure function body of "1" is called only once.
>
> So in
>
>     foo1 : () -> %
>     foo2 : constant -> %
>
> the function body of "foo1" will run many times and the function body of 
> "foo2"
> will run only once.  I didn't know this distinction before...
>

Thank you! I think this distinction is clear and important.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAC6x94T4eufFtLdfVgSACjABVhW4WPNza2dDtpwFrAgqC%2BEySQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to