>
> Hi Waldek,
>
> On 10/28/2012 04:48 PM, [email protected] wrote:
> > diff --git a/src/algebra/xhash.spad.pamphlet
> > b/src/algebra/xhash.spad.pamphlet
> > index 9b9bcab..5e452ed 100644
> > --- a/src/algebra/xhash.spad.pamphlet
> > +++ b/src/algebra/xhash.spad.pamphlet
> > @@ -226,7 +226,7 @@ representation.
> >
> > Putting everything together yields the following.
> > <<representation>>=
> > -Rep == Record(_
> > +Rep ==> Record(_
> > numOfEntries : Z, _
> > maxNumOfEntries : Z, _
> > numOfDeletedEntries : Z, _
>
> I suppose, the actual bytecode is not modified by commit r1481. And
> given the fact that == means "lazy evaluation" in SPAD in contrast to
> "definition of constants in Aldor, it is probably a step in the right
> direction, but I don't quite understand the impact.
>
> Can you say a few words about the differences of
>
> Rep := ...
> Rep ==> ...
> Rep == ...
>
> . The == form seems to be deprecated now. Am I right?
ATM the '==' form defines a function and requires type for left
hand side. So the '==' above do not work anymore.
The 'Rep := ...' form is assgnment to 'Rep' and triggers magic
handling of 'Rep' in the compiler. The 'Rep ==> ...' form
is a macro which is expanded before core compiler can see it,
so 'Rep' there works like any other identifier.
The compiler used to convert '==' with empty argument list and
no type to a macro. However, the code doing this was buggy.
Also, I prefer to be explict: if I want macro I write a real
macro. The old behaviour meant that for example bunch of
'sample' functions with no declaration was silently converted
to macros and (due to no use) effectively ignored.
I am not sure if we want to how much support for '==' with left
hand side without explicit type is desired. Currently for
domains type is inferred from right hand side (if possible,
otherwise we get error). In other cases such definition
signals error.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.