Parameterizing on incomplete types
Per Bothner
per@bothner.com
Tue Dec 6 08:49:00 GMT 2011
On 12/05/2011 10:53 AM, Jamison Hope wrote:
> I have an attempted solution now.
Looks good - or at least enough for now
Could you write some test-cases? I'd like both some
tests where the base and derived class are in the same module,
and ones where they're compiled separately.
Of course it would be easier to write comprehensive tests if we could
define parameterized type in Kawa. The obvious syntax seems
to be:
(define-simple-class Foo[T] ... T ...)
One could argue that instead one should think of Foo as a meta-function
that returns a class, something like:
(define Foo
(lambda (T)
(class () ... T ...)))
but let's not go to computed first-class types, at least not yet!
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list