- Problem with pointer semantics
----boundary-LibPST-iamunique-6364913_-_-
Content-type: text/plain
Two comments arrived as I was writing or sending my last reply. Wojtek brings up a serious issue. I wonder what they teach students about this.
Wojtek brought up the problem of dynamic variables withing records. It doesn't matter whether the records themselves are arrays. Assignment still mangles the contents by aliasing and destroying pointers. If I'm not mistaken, this is a problem.
To tell the truth, I don't remember how I handle that situation except to muddle through and try to keep track of the problem within. I suppose one can label the type definitions and variable names as containing dynamic structures. Maybe variables and types that should not be assigned could start with an 'x' or 'X'. My suggestion for a compiler feature suddenly seems difficult to implement.
Wikipedia has a good explanation of Hungarian notation. It's usually associated with the C language. It's unpopular because a lot of ugly type information is typically encoded in variable names in a desperate attempt to avoid type errors.
Rex Couture
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-6364913_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFx0YWIgVHdvIGNvbW1lbnRzIGFycml2ZWQgYXMg
SSB3YXMgd3JpdGluZyBvciBzZW5kaW5nIG15IGxhc3QgcmVwbHkuICBXb2p0ZWsgYnJpbmdzIHVw
IGEgc2VyaW91cyBpc3N1ZS4gIEkgd29uZGVyIHdoYXQgdGhleSB0ZWFjaCBzdHVkZW50cyBhYm91
dCB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IEMgbGFuZ3Vh
Z2UuICBJdCdzIHVucG9wdWxhciBiZWNhdXNlIGEgbG90IG9mIHVnbHkgdHlwZSBpbmZvcm1hdGlv
biBpcyB0eXBpY2FsbHkgZW5jb2RlZCBpbiB2YXJpYWJsZSBuYW1lcyBpbiBhIGRlc3BlcmF0ZSBh
dHRlbXB0IHRvIGF2b2lkIHR5cGUgZXJyb3JzLlxwYXINClxwYXINClJleCBDb3V0dXJlXHBhcg0K
XHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNlbmQgc3ViamVjdCBIRUxQIG9yIFVOU1VCU0NS
SUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaH19AAAAAHYAAADIklI=
----boundary-LibPST-iamunique-6364913_-_---
Received on Wed Jun 21 2006 - 00:34:06 UTC
This archive was generated by hypermail 2.3.0
: Thu Sep 26 2013 - 06:27:50 UTC