>> Hi Martin,
>>
>> I have not tested it, but I wonder if it is possible to leave
>>
>> empty: %
>>
>> at SetSpecies and additionally define empty: () -> % for the Axiom
>> interface. That would avoid many #if Axiom ... #endif in your code.
> 
> Yes, but I don't know either. However, I think we should think twice before
> exporting constants somewhere (same in DataStream, etc.) if they could be
> modified accidentally. In these cases, it might make more sense to export a
> nullary function. I don't think that the answer is obvious, we should think
> about it.

So, if the constant gets modified then it should have been done by a 
destructive function from FormalPowerSeries, say. (DataStream does not 
export constants.) But are you really suggesting that I should export

0: () -> %

instead of

0: %

? If someone uses a destructive function s/he should be aware of the 
fact that it can have disastrous side effects. "Ordinary functions" 
should never be a problem. If they are, that's a bug.

>> And if it doesn't work I would rather introduce a macro
>>
>> #if Axiom
>> EMPTY ==> empty();
>> #else
>> EMPTY ==> empty;
>> #endif
>>
>> instead of repeating #if Axiom all over the place.
> 
> This is certainly an option.

I think a much better one because it doesn't clutter up the source code.

Can you produce an example (a short .as file) where constant exports 
doesn't work in Axiom? Please write the file independent of AC, so that 
it could live in the Axiom IssueTracker. Thank you.

Ralf

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to