Re: [BLACKBOX] SYSTEM.VAL, WITH, IS, and type casting

From: Douglas G. Danforth <"Douglas>
Date: Mon, 22 Aug 2011 13:35:21 -0700

----boundary-LibPST-iamunique-315469145_-_- Content-type: text/plain Bernhard, I was not trying to solve the restoring some object from disk problem but rather considering the assignment of one type to another type. I was taken back and had to think about the SYSTEM.VAL(BYTE, schar) case for several minutes before I understood what OMI was doing. It seemed backwards to me but it is not. By writing SYSTEM.VAL(BYTE, shar) one is essentially doing schar := byte; and by passing the type checking mechanism. One can write wr.WriteStore(m); rd.ReadStore(SYSTEM.VAL(Store, m)); which is asymmetric in the treatment of writing and reading. I just don't like asymmetry. -Doug On 8/22/2011 6:03 AM, Treutwein Bernhard wrote: Hi Doug, it is not really clear to me, if you want to solve the hen & egg problem when restoring some object from disk, but if this is the case you might consider Hanspeter Mössenböcks remarks in Chapter 9.4.6 of the third Ed. of his OOPO2 (starting on the bottom of page 42 of http://ssw.jku.at/Research/Books/DesignPatterns.pdf). But I am not shure since primarily you refer to Stores.Reader.ReadSChar which isn't reading an object at all (at least I would not consider a short character an object) ... and later you are referring to output, which is yet another case ... regards -- Bernhard ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy ----boundary-LibPST-iamunique-315469145_-_- Content-type: application/rtf Content-transfer-encoding: base64 Content-Disposition: attachment; filename="rtf-body.rtf" e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbWh0bWwxIFxkZWZmMHtcZm9udHRibA0Ke1xmMFxm c3dpc3NcZmNoYXJzZXQwIEFyaWFsO30NCntcZjFcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO ZXc7fQ0Ke1xmMlxmbmlsXGZjaGFyc2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0 MCBDb3VyaWVyIE5ldzt9fQ0Ke1xjb2xvcnRibFxy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