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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!v19g2000yqa.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Properties Date: Sun, 28 Nov 2010 11:43:12 -0800 (PST) Organization: http://groups.google.com Message-ID: <7c064ffc-8454-471f-bade-62b4309b7290@v19g2000yqa.googlegroups.com> References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> NNTP-Posting-Host: 174.28.198.93 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1290973392 27491 127.0.0.1 (28 Nov 2010 19:43:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 28 Nov 2010 19:43:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v19g2000yqa.googlegroups.com; posting-host=174.28.198.93; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15688 Date: 2010-11-28T11:43:12-08:00 List-Id: On Nov 28, 1:15=A0am, "Dmitry A. Kazakov" wrote: > On Sat, 27 Nov 2010 19:21:55 -0800 (PST), Shark8 wrote: > > I would like to submit a proposal for future Ada development; namely > > "Properties." > > Instead of properties I would prefer a full abstraction of record, array, > access, numeric types. E.g. you declare something as a record of certain > members and privately implement it as another record with other members o= r > as anything you like providing operations to read/write the publicly > declared members. I think it is a more simple and more natural to Ada mod= el > than properties. > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de I'm not sure I see the difference between properties and your "full- abstraction"; that is to say, aren't properties merely a way of implementing that sort of abstraction (though with the additional option of being read-only or write-only)? Couldn't we have something similar to Type Something is record S : String_Property; end record; --private or body Default_State : Constant String:=3D "ANGRY KITTEN"; Stateful_Data : Not Null Access String:=3D New String'(Default_State); For Something.S'Read Use Stateful_Data.All; Procedure Set_Data( Input : In String ) is begin if Input =3D "PLAYFUL KITTEN" OR Input =3D "RABID KITTEN" OR Input =3D "ANGRY KITTEN" OR Input =3D "DEAD KITTEN" then Stateful_Data :=3D New String'( Input ); end if; end Set_Data; For Something.S'Write use Set_Data; Or am I completely misunderstanding your intent? Also, do you have a possible syntax for these abstractions? {it may help me fully-understand your position.}