On Tue, 6 Jan 2026 at 16:37, Ralf Hemmecke <
ra...@hemmecke.org> wrote:
>
> Oh, maybe if it is only a problem for the exports, i.e. in the category
> part, I can probably live with that weakness.
> Can I still assume that it is only a weakness of the current compiler
> and supposed to work in a proper implementation of the (not so specified
> ;-) ) SPAD language.
>
> At least in the default package of a category, it seems to work.
>
>
https://github.com/aldorlang/aldor/blob/master/aldor/aldor/lib/libfoamlib/al/langx.as#L219
>
> Maybe Peter Broadbery knows more about this and how strong the "is" is
> in the Aldor language. I seem to remember that "is" was also not fully
> supported in Aldor.
>
> I don't know, in which way this IsPackage/TypePackag is used in Aldor
>
The Aldor compiler doesn't have specific support for 'is' - There is
only specific support for 'has'. Other conditions are dealt with
by carrying the condition forward, and evaluating at runtime. For a
second example, think of a condition like 'if prime? n' .. on a
ZmodN(n: Int) domain. The compiler won't call arbitrary code, so it
can't do a great deal with the condition except ensure that it is
checked at runtime.
Thus 'foo: A -> B if A is Integer' will be listed as an export of a
domain regardless of A, and to access the export it
would have to be guarded by 'if A is Integer', replacing A as needed.
I would like to improve on that, but there's other things on the path.
The current list is pattern matching, then removing the need to
declare function arguments and return types.
Peter