freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pooma-dev] Re: [pooma-cvs] CVS update: pooma


From: James Crotinger
Subject: RE: [pooma-dev] Re: [pooma-cvs] CVS update: pooma
Date: Fri, 25 May 2001 12:13:30 -0700



> -----Original Message-----
> From: Julian C. Cummings [mailto:address@hidden]
> Sent: Friday, May 25, 2001 11:59 AM
> To: address@hidden
> Subject: [pooma-dev] Re: [pooma-cvs] CVS update: pooma
>
>
> Hi All,
>
> I just wanted to apologize for jumping in and patching
> the DomainTraits.h file.

I don't think anyone has commented on the point that I made yesterday - Array.h and Field.h use DomainTraits but never include DomainTraits.h. Furthermore, their op() functions are designed to treat int args as Domains, so clearly these files should be including DomainTraits.h and DomainTraits.int.h. I don't know if that fix the problem that Jeffrey is specifically looking at, but it should be done anyway since the code, as it stands, is wrong.

Regarding including DomainTraits.int.h at the end of DomainTraits.h - the purist in me feels that the user of DomainTraits should make this decision - if he's expecting to treat ints as Domains then he needs to write all the code using DomainTraits; what Geoff Furnish would probably call "Domain-free" code. However, there are a number of places in Pooma where the code is NOT written to be "Domain-free" and which would not compile if a Domain template parameter were an int. I'm sure there are even functions with separate overloads that have different semantics for int args. This code doesn't *need* to see DomainTraits.int.h.

On the pragmatic side, I can't see that it would hurt (any code that would compile with this change that had not formerly compiled would treat the int as a Loc<1> and behave just as if a Loc<1> had been passed - I suppose if the user had just made a mistake, this might be hard to find - i.e. this specialization weakens type safety somewhat) and the Domain design is such a mess already that I'm certainly not going to hold up a change like this for purity sake. 8-)

        Jim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]