Hi
I always found that the term WideClass was bad since this is more
Adaptable Instances :)
So may be we should not stick with his ugly term.
Do you garante constraints in the subclass hierarchy as in the paper?
Can you tell us how you implemented that?
Do you change class dynamically?
Do you have difference classes?
How do I browse the code of a class having shrinkable instances?
Stef
On 31 août 07, at 23:52, Adrian Kuhn wrote:
As ESUG was so inspiring, I could not resist some VW
hacking on the
train home...
If you browse to WideClass and WideClassTest on SCG Store, there is a
simple implementation of wide classes. As we have tons of empty inst
vars in moose models, that might help us to save some megas on large
case studies.
How to use it?
Sending #wide:put: to any object will install an instance var and
accessors on the receiver instance.
o := Object new.
o wide: #foo put: 4.
o foo
and even better, if you implement #foo and #foo: as follows
foo ^nil
foo: arg self wide: #foo put: arg
upon first execution of #foo: the foo inst var is installed and both
methods get properly overriden with simple accessors. There is no DNU
hack anywhere!
Hope you have some fun playing around with it!
cheers,
AA
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev