[clean-list] Clean compiler bug
eli+@gs211.sp.cs.cmu.edu
eli+@gs211.sp.cs.cmu.edu
Fri, 9 Feb 2001 14:12:28 -0500 (EST)
Martin Wierich wrote:
> Hi Eli,
Hi, thanks for your help.
> You are doing nothing illegal, it's a compiler bug. The only workaround I've
> found is to specialize your functions to certain kinds of arrays
Hmm. The reason I'm using Clean is its respectable array-processing
performance, which requires using unboxed. The workaround I'm using
at the moment is simply to not use modules -- glom all my code into
one icl file.
I think it will work to define two families of functions, one boxed
and one unboxed. Manual code replication, blah, maybe I should get
the C preprocessor involved. :-/
I wonder if this bug and its precise extent are documented anywhere.
It would be good to know what kinds of overloading will work as expected.
> (this will also speed up your code).
Oh heavens, is it doing run-time dispatch instead of instantiating at
compile time? My reading of the "costs of overloading" section of the
manual was that this would happen only when a class was exported from
a module, but not its concrete instances. Let me figure out the rule...
--
Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/