On 01/28/2007 12:20 PM, Martin Rubey wrote: > Dear all, > > some days ago I discovered that > > macro * == Times > > issued in the interpreter has a somewhat negative side-effect: one cannot (at > least, I could not) use "*" for multiplication of, say, integers anymore... > > Still, I do not believe that we should overload * and +. It's just a remark.
Of course, one should not do it by a macro since then all the information about the type of * is lost. If Times: (A, A) -> A Then you should rather define (a: A) * (b: A): A == Times(a, b); which has the same effect and carries over the type. The reason why I have put a macro inside some places of Aldor-Combinat is that they are quite restricted in scope. But I would have the same problems if I'd have to use multiplication of integers when the above macro is in scope. It's simply not an issue of the interpreter but in which scope the macro appers. 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