On Fri, Feb 19, 2021 at 12:56:58AM +0100, Ralf Hemmecke wrote:
> On 18.02.21 18:38, Waldek Hebisch wrote:
> > On Thu, Feb 18, 2021 at 06:36:57PM +0100, Waldek Hebisch wrote:
> >> See attached file and Aldor compilation report (I sent it before
> >> but I include it in case it got lost).
>
> Waldek,
>
> I do not understand why you complain here.
>
> "/mnt/lv3/fricas/axp19/pp1/algreduc2/RDEEFX3a.as", line 36:
> ei_int : (Z, F, F, SE) -> PSOL2
> ......^
> [L36 C7] #1 (Warning) Escape character ignored. Do you mean '__'?
>
> Aldor convention is to use CamelCase for identifiers. And that was also
> the rule for SPAD code (except for some people that insisted on using
> underscores (which had to be written as double underscores).
> Then you changed the SPAD compiler with a new rule that allows single
> underscores.
>
> I would have liked to stay with CamelCase. Now we have basically two
> naming conventions. There are only a few functions now that include an
> underscore character (I guess mostly introduced by you). That you now
> complain about Aldor throwing errors at you for an incompatibility that
> you have introduced is somewhat strange.
This is just a warning, in first pass of checking Spad code we
probably can ignore warnings. OTOH this is important feature
for mixed-language code. In Lisp camelCase is not practical,
dashes that Lispers use are illegal in other languages, so
only sane choice is to use underscores.
> There are a number of other issues with your code.
>
> I doubled the underscores.
>
> The problems were mostly forgotten imports. Note that Aldor insists on
> importing functions explicitly. Unlike SPAD almost nothing is in scope.
Yes, I know this. One point of this excercise was to see how many
explicit imports I would need. It was disappointing that other
problems apparently dwarfed issue with imports.
> Then there were a few cases where I had to add a qualification, for
> example here:
>
> univariate(r1, kx)$F
>
> where the Aldor compiler saw two functions with name "univariate" that
> would have been applicable. Without giving some type information it
> didn't know what to choose.
>
> The most problematic thing, however was the
>
> Union(CV__REC, 'failed')
>
> construction.
IIUC Aldor does not suport "failed" (with Spad notation) as a type,
which leads to massive source changes (this is in the language
differences page).
> I could make it compile with this type
>
> Union(cv:CV__REC, fail:'failed')
>
> Perhaps Peter knows how to make it compile with an untagged union.
>
> One must also put the return value into a "union" explicitly.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/20210219002524.GA12316%40math.uni.wroc.pl.