23 Apr 2012 19:59
Re: comparing to an exact class & storing class association relationships
Ben Coman <btc <at> openInWorld.com>
2012-04-23 17:59:47 GMT
2012-04-23 17:59:47 GMT
Randal L. Schwartz wrote:
If ConductingEquipment is a null-subclass then at the instance/model level it could be completely interchanged with Equipment because the association is inherited. However at the meta / class-description level (ie storing the data to be able to redraw that diagram) ConductingEquipment and Equipment seem not interchangable since no direct line exists between ConductingEquipment to EquipmentContainer.
I'll continue to muse on that. Thanks for you reply.
cheers -ben
I've been taking my time to wrap my head around your comment. It makes complete sense when thinking about the use of the object model. However (if you can refer to the attached diagram showing one association and one inheritance relationship) what I am trying to work out is whether that applies as strongly one level up at the meta / class description.Ben> doh! <smacks-head> funny how it works itself out when you step away for a Ben> while - this works fine... Ben> B class >> relations Ben> (self == B) Ben> ifTrue: [ ^ { E-> #addE. } ] Ben> ifFalse: [ ^ {} ] Ben> but I still wonder if it is the right approach Without further analysis, or description of the problem you're trying to solve, this already looks far too fragile for me. For one, it fails the "null subclass" test. You should always be able to subclass a class, putting no methods in the subclass, and the subclass and superclass objects would be completely interchangeable."Ben" == Ben Coman <btc <at> openInWorld.com> writes:
If ConductingEquipment is a null-subclass then at the instance/model level it could be completely interchanged with Equipment because the association is inherited. However at the meta / class-description level (ie storing the data to be able to redraw that diagram) ConductingEquipment and Equipment seem not interchangable since no direct line exists between ConductingEquipment to EquipmentContainer.
I'll continue to muse on that. Thanks for you reply.
cheers -ben
_______________________________________________ Beginners mailing list Beginners <at> lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RSS Feed