[pooma-dev] Re: [pooma-cvs] CVS update: pooma
James Crotinger
JimC at proximation.com
Fri May 25 19:13:30 UTC 2001
> -----Original Message-----
> From: Julian C. Cummings [mailto:cummings at mail.linkline.com]
> Sent: Friday, May 25, 2001 11:59 AM
> To: pooma-dev at pooma.codesourcery.com
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010525/0a033b28/attachment.html>
More information about the pooma-dev
mailing list