>>> Foo(S: SubsetCategory(R)):...
>> I don't see the advantage of this. Suppose you define a Foo like this
>> and now you are going to explicitly write the "add" part. Which
>> functionality of S can you now actually use inside Foo? You always have
>> to wrap things with if's like
> Actually SubsetCategory has extra argument, so it specifies
> subset which is of specific category.
Sorry that I made that mistake, but that extra argument does not really
matter much. Why? If I write
Foo(S: SubsetCategory(Monoid, R): ...
then (as far as I understand now) is the same as saying
Foo(S: Monoid): ...
with the additional (otherwise not specifiable) understanding that S is
a subset of R and that S and R share the same representation.
Actually, above I forgot even more.
===============
1) If I specify
Foo(S: SubsetCategory(Monoid, R): ...
then R and its explicit category must be known outside Foo. Let us say
the domain R is specified like
R: CatOfR == add ...
or R is an argument to a domain in which Foo is locally defined. Also
then we have at least
WrapperDomain(R: CatOfR, ...): ... == add
...
Foo(S: SubsetCategory(Monoid, R): ...
So the category part of S would be clear. It is
Join(Monoid, CatOfR)
And that is known at compile time. So I could equally well have written
explicitly
Foo(S: Join(Monoid, CatOfR)): ...
================
2) R is also a parameter of Foo. Then we have
Foo(R: CatOfR, S: SubsetCategory(Monoid, R)): ...
But also here I know the category of R explicitly and could have written
Foo(R: CatOfR, S: Join(Monoid, CatOfR)): ...
================
Of course the R and S that one actually plugs into Foo might have more
functionality. But the code cannot rely on that and thus *must* be
started with a statement like
if S has SomeFunctionality then ...
So for me that says that the only thing that is really encoded in
SubsetCategory is that one requires the parameter R, S really to be in a
subset relation.
But now in some sense Bill might be right. Without the SubDomain
constructor I don't see any other way to construct subsets of a domain.
Otherwise SPAD lets me do is to specify a new domain that inherits its
implementation from some given domain. But since (except SubDomain)
there is no mechanism to state that two domains have the same
representation, I am not able to even create a domain that would fulfil
the SubsetCategory(Monoid, R).
Sharing the representation and state this by some language constructs
might be a good idea, but I somehow think this needs more elaboration.
I am still for removing SubsetCategory (and actually also SubDomain).
I have nothing against introducing similar concepts later, but only with
a clear specification of their meaning and a discussion of their pros
and cons.
Has someone already checked
http://axiom-wiki.newsynthesis.org/SandBoxSubsetCategoryRemoved ?
Ralf
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---