It seems there were some errors so that the following mail did not made it to the list. :-(
Ralf Subject: Re: trunk revision 189 From: Ralf Hemmecke <[EMAIL PROTECTED]> Date: Sun, 18 Mar 2007 11:14:55 +0100 To: Martin Rubey <[EMAIL PROTECTED]> CC: aldor-combinat-devel <aldor-combinat-devel@lists.sourceforge.net> Hallo Martin >> * src/species.as.nw, test/species.as.nw: >> - Implemented the Subset species and adapted the Times >> constructor to use that species. > I somewhat like and dislike coerce and complement being two functions at the > same time. Although the time needed might be negligible, it seems a waste to > me to double it just because we disagree on the naming. > > Or do you have another reason? I made it two functions for some reasons. 1) One might want to access only one part of the (subset, complement) pair. So two functions seemed to be the better choice. 2) If a function is called coerce: A->B, then I would like to call it with a::B and not coerce(a). If I had made coerce: A-> (B,B) then (set, complement) := a::(B,B) does probably not work. (I've not tested it.) So I would have to have coerce: A->Cross(B,B). (That sounds not too bad.) 3) The time for calling two functions is not too much overhead, I suppose. But I had no idea for a good name of such a function. "coerce" is somewhat too generic. 4) I thought some time whether I should call the functions "subset" and "complement" instead of "coerce" and "complement". But for me it sounded somewhat strange to have an element of "Subset" and then call a function "subset" to actually get a subset. But since the result is of type "SetSpecies", perhaps "set" would be an appropriate name. 5) I have not introduced a function "setAndComplement" since that looks too long for me and I did not really like the "coerce: % -> Cross(B,B)" version. 6) I don't want to have a record like Record(set: SetSpecies L, complement: SetSpecies L) as a result type. If at all, then Cross(SetSpecies L, SetSpecies L) would be much better, because it looks more mathematical. 7) As always, consider my decisions as debatable. If you come up with something better, then we can certainly change it. All the best Ralf ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Aldor-combinat-devel mailing list Aldor-combinat-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel