Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.6-beta-1
-
None
Description
The current implementation of mixin requires the target type to be the first argument:
IntegerMixin { Integer crazyPlus(Integer self, Integer other) { self - other } }
This is ugly. We need to change it to support true mixins where we change the meaning of "this" to refer to the object:
IntegerMixin { Integer crazyPlus(Integer other) { this - other } }
You should also be allowed to store state in the IntegerMixin class so that mixins can be stateful