Quick questions: mixing in without losing a constructor

27 views
Skip to first unread message

Jan Sinschek

unread,
Jun 15, 2013, 11:18:47 AM6/15/13
to newspeak...@googlegroups.com
Hi,

if anyone can spare a moment: can I currently mix something in and have the resulting class contain the constructor of the "superclass"?
I know that

class A a: a = Other a: a

can be mixinApply:-ed to

Another a: a

and yield what is (for all I know) equivalent to

class A a: a = Another a: a

This does not work if my mixin is supposed to be applied to classes with different constructors.
Is there anything right now for the case where not extra parameters are supplied by my mixin A, so that
class A = ()() mixed-into {B,C,D} will yield s class with the constructors that B, C, or D have had, respectively?

(Sorry that I won't be able to respond again questions for over a day.)

Cheers,
jan

Gilad Bracha

unread,
Jun 15, 2013, 11:32:02 AM6/15/13
to newspeak...@googlegroups.com
Hi Jan,

This topic comes up now and again. For now the answer is that it really doesn't work. I have a plan to fix this - I hope to find some time in July to deal with it.
Reply all
Reply to author
Forward
0 new messages