From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada202X: Easy to use "UML private"-like components Date: Fri, 12 Jul 2013 07:57:28 +0100 Organization: A noiseless patient Spider Message-ID: References: <69246de0-4b33-4d47-b5be-a45e8c911fb0@googlegroups.com> <4d7e6232-1e3b-4ad8-b754-16d6e8642006@googlegroups.com> <91927795-6b9d-41d5-b885-2709d96fc1f9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="c8504a89c76ea11bda6664e6198ae3cd"; logging-data="25834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zG2CRPWdb9K9wdxNSkoU0quc1pnavQOo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:PEz7wumMrFc1j+UbcXLojt9IBXM= sha1:4/UyRZraoJJqiP3kLyZZ2GQCQhg= X-Original-Bytes: 2201 Xref: number.nntp.dca.giganews.com comp.lang.ada:182483 Date: 2013-07-12T07:57:28+01:00 List-Id: Martin writes: > Yes, but I'd rather go through set/get - direct access to attributes > is content coupling...that's evil!! :-) and they're useful for > breakpoints etc to see which call stack is setting a particular > value... > > ...the other big problem, is that what you see on a OMD or CD wrt > visibilties is not what you get in the code. I would have thought it'd make more sense to provide accessors for the public attributes (and not for the others) while keeping the public attributes themselves private (protected?), since derived(?) classes _should_ be able to see the protected attributes? But, that said, it doesn't seem unreasonable to map the model's attribute visibilities to accessor visibilities. What else should you do?