Re: [BLACKBOX] Questions about inheritance

From: [at]} <Fyodor>
Date: Sun, 13 Mar 2011 13:27:59 +0300

----boundary-LibPST-iamunique-263875725_-_-
Content-type: text/plain

> I want to avoid implementation inheritance in CP programs.
> What are the language features I have to rule out ?
> Is it just the super call which I have to avoid or something else ?

Give priority to composition over inheritance.

Inherit, if you must, only from ABSTRACT classes. No EXTENSIBLE types or methods.
Methods should be ABSTRACT, EMPTY or FINAL.
No supercalls, use ordinary exported procedures instead (this is always possible).
Avoid exported fields, use functions instead (better evolvability).

Stick to sequential data structures and algorithms whenever possible (scalability),
exploit carrier-rider to the full -- hide data access behind abstract riders.
Your specific data processing algorithms should interface to abstract riders rather than carriers.

Give priority to text-as-interface over forms.

Avoid anything fancy or smart or optimized -- that's Devil tempting you.

Once again: f*** optimizations!

cheers
fyodor

Powered by the E-mail PIM - Info Select - www.miclog.com


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-263875725_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gSSB3YW50IHRvIGF2b2lkIGltcGxlbWVudGF0
aW9uIGluaGVyaXRhbmNlIGluIENQIHByb2dyYW1zLlxwYXINCj4gV2hhdCBhcmUgdGhlIGxhbmd1
YW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XMtaW50ZXJmYWNl
IG92ZXIgZm9ybXMuXHBhcg0KXHBhcg0KQXZvaWQgYW55dGhpbmcgZmFuY3kgb3Igc21hcnQgb3Ig
b3B0aW1pemVkIC0tIHRoYXQncyBEZXZpbCB0ZW1wdGluZyB5b3UuXHBhcg0KXHBhcg0KT25jZSBh
Z2FpbjogZioqKiBvcHRpbWl6YXRpb25zIVxwYXINClxwYXINCmNoZWVyc1xwYXINCmZ5b2Rvclxw
YXINClxwYXINClBvd2VyZWQgYnkgdGhlIEUtbWFpbCBQSU0gLSBJbmZvIFNlbGVjdCAtIHd3dy5t
aWNsb2cuY29tXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5k
IGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RT
Lk9CRVJPTi5DSH19AGG+oxA
----boundary-LibPST-iamunique-263875725_-_---
Received on Sun Mar 13 2011 - 11:27:59 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:17 UTC