Ok, thanks for this information. I am in the process of modifying my
code, I heavily used the '==' form. Replacing '==' with '==>' does not
work for SubDomain though.

BTW it seems a lot of code in FriCAS algebra uses '=='.

Regards,

- Greg

Le mer. 29 nov. 2023 à 15:56, Waldek Hebisch <de...@fricas.org> a écrit :
>
> On Wed, Nov 29, 2023 at 02:51:52PM +0100, Grégory Vanuxem wrote:
> > Hello,
> >
> > In Spad, with Exports or Implementation the macro or function
> > definition operators can be used. What I mean is that:
> >
> >   Exports == with
> >   Implementation == add
> >
> > seems to be identically treated with:
> >
> >   Exports ==> with
> >   Implementation ==> add
> >
> > The two seem to compile identically (I have not looked at the Lisp
> > code generated).
> >
> > So my questions are: are these pieces of code treated identically by
> > the compiler, if not, is the second piece of code treated as a macro?
> > And what is the difference?
>
> The second one, that is '==>' is the one which should be used.  Yes,
> '==>' is treated as a macro, it replaces symbol on the left hand side by
> parse tree of thing on the right hand side.  Difference is that '==' is
> a definition, thing on the right hand side of '==' is supposed to have a
> value.  So '==' should work at semantic level, while '==>' works at syntactic
> level.
>
> Currently semantic handling in Spad compiler has troubles at early
> stage of compilation, so in some place '==' is treated as '==>'.
> And in some other places '==' may fail when '==>' works.
> But if semantic handling is improved differences may show up and
> there is possiblity of errors when wrong thing is in use.
>
> Note: differences between the two are rather subtle, so in most
> cases either should work.
>
> Remark: FriCAS book say that '==' is "delayed assignment".  This
> meaning should be considered obsolete now.
>
> --
>                               Waldek Hebisch
>
> --
> 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 fricas-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/ZWdRC-jyKtJpYIe1%40fricas.org.

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZ7JC8TK_aMCDN5%2B%3DD6cdaz%2B7ovgseuKaojainY5cLyBQ%40mail.gmail.com.

Reply via email to