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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Mon, 3 Aug 2015 18:26:17 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <91f88d79-197c-419f-84a8-908e05967a2c@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1438644390 28402 24.196.82.226 (3 Aug 2015 23:26:30 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 3 Aug 2015 23:26:30 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:27347 Date: 2015-08-03T18:26:17-05:00 List-Id: wrote in message news:alpine.DEB.2.20.1507311715090.24880@debian... On Thu, 30 Jul 2015, Randy Brukardt wrote: >>> and extension of this attribute to cover record and array types. >> >> We've tried that (and the topic is still open, AI12-0020-1), but it >> quickly >> runs into a host of little problems (what do to with access components? >> How/whether to make a matching 'Value? What about private components? >> Etc.) >> I wouldn't count on seeing that ever happen. > >How about supporting > > T'Image (or O'Image for objects of type T) > >if and only if T'Image has explicitely been defined? > >... There would be a contract model problem (in a generic, you couldn't know if a formal private type had 'Image). That's solveable. The real problem is that this doesn't buy much of anything. All it does is changes the name slightly, as anyone can define a function Image for their type. And the call is easier than the attribute reference since you don't have to figure out the name of the subtype: Image (Obj) or Obj.Image -- If Obj has a tagged type. vs. My_Type'Image (Obj) The gain from having an attribute is when it is automatically created in some cases (that's true for Streams, and it's true here). And that's where the issues pop up. Randy.