[Aldor-l] IsPackage with Tarzan and Jane
Ralf Hemmecke
ralf at hemmecke.de
Sun Aug 17 16:27:23 EDT 2008
Dear Stephen,
in aldor/lib/libfoamlib/langx.as
there is
IsPackage: with {
is: (with, with) -> Boolean;
} == add {
-- further obfuscation welcome.
You(X: with): Category == with;
Me(OW: with): You(OW) with == add;
is(Tarzan: with, Jayne: with): Boolean == Me(Tarzan) has You(Jayne);
}
which is probably a library implementation of a language defined "is".
Since I would like to compare two objects as you have seen from my
previous code, I must be able to compare two domains. Of course, I don't
want to take pointers.
Does the implementation
equals?(X: PT, x: X)(Y: PT, y: Y): Boolean == {
import from IsPackage;
if X is Y then (x = y pretend X) else false;
}
look correct to you? At least the compiler understands it.
Is there any way I can do without 'pretend'?
Is there any chance that "IsPackage" can make it into
lib/aldor/src/lang/sal_lang.as?
Ralf
More information about the Aldor-l
mailing list