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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,16bd8131a17b875d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 29 Jun 2005 23:09:43 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <2ifue.819$Z97.597@trndny06> Subject: Re: Virtual Components in Ada and Ruby Date: Wed, 29 Jun 2005 23:12:48 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: <9oadnZwlOoYa7V7fRVn-2A@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-ENK1a2055BZ0mVytxbS19pZoU5ykoM4IrOpqA31eC8i1bqwqbmpDl2raGrOgWP9/NQ7z5qpj0fEhGDj!Z9hXYhXxD12wf8/U2GTcMYo+fp4guwzDd2kj29XE065LVN17vwKCV+I9HC4hghOtSzfReIh5gAFv X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:11747 Date: 2005-06-29T23:12:48-05:00 List-Id: "Frank J. Lhota" wrote in message news:2ifue.819$Z97.597@trndny06... .... > Looking ahead to Ada 201Z, should there be user-defined virtual record > components? Currently, a component of a record must always be defined as > a section of memory in a record. Would it be desirable to also be able > to define a record component in terms of subprograms for reading and > writing that component? I think it would likely be too ambiguous with other possibilities to be very useful. Certainly, Ada 200Y has "virtual record components" for reading: type Something is tagged record ... end record; function Virtual (Obj : in Somthing) return Integer; Object : Something; if Object.Virtual = 10 then ... But there doesn't seem to be a practical way to make them writable on the LHS of an assignment. A procedure call isn't too bad in that case: Object.Set_Virtual (To => ); Randy.