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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.43.88.73 with SMTP id az9mr647442icc.5.1398335513484; Thu, 24 Apr 2014 03:31:53 -0700 (PDT) X-Received: by 10.140.21.233 with SMTP id 96mr14128qgl.19.1398335513444; Thu, 24 Apr 2014 03:31:53 -0700 (PDT) Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!l13no10357862iga.0!news-out.google.com!dz10ni20787qab.1!nntp.google.com!cm18no5938959qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 24 Apr 2014 03:31:53 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.145.50.10; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 NNTP-Posting-Host: 83.145.50.10 References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <1ehc8moozpxnj$.1twbrsmoobjry.dlg@40tude.net> <63812656-3d79-4330-8b02-1836f3669b00@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Your wish list for Ada 202X From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Injection-Date: Thu, 24 Apr 2014 10:31:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 4307 Xref: number.nntp.dca.giganews.com comp.lang.ada:186064 Date: 2014-04-24T03:31:53-07:00 List-Id: Den onsdagen den 23:e april 2014 kl. 22:28:29 UTC+2 skrev Randy Brukardt: > "bj=F6rn lundin" wrote in message=20 > news:63812656-3d79-4330-8b02-1836f3669b00@googlegroups.com... >=20 > That would be a very weird restriction, as subtype'Image is defined for a= ll=20 > scalar types (including float and fixed types). Hmm, yes. But that comment was due to me misreading/misinterpreting Dmitrys= =20 answer with ambiguty for float values.=20 So yes, it would be a weird restriction. My thought was to have it as a plain shortcut to=20 standard Ada's Type(Variable)'Image=20 or gnat's Varable'Img =20 > Also note that the name would be "Image". GNAT uses "Img" because=20 > language-defined attributes cannot be redefined, but they would have much= =20 > preferred to call it "Image".=20 And that is totally ok with me. 'Img or 'Image on the varible is ok. Id just like to get rid of quilifying the type, since the variable knows=20 it's own type. That is it. Then, to make log statements from records, i propose that the programmer can point out what funtion to=20 use for 'Image for this record. makes it SOO much easier to throw in a log-line. > If it's still required to stay in Ada 83, then adding Obj'Image to Ada 20= 20=20 > isn't going to help any. It is not. We compile using Ada05 flag (gnat) We are migrating homebrew bindings to os-stuff via e.g. Ada.Directories. But a great chunk of the code is written in Ada83-style, meaning very few tagged objects. They are of course of much later date. > If it's able to be changed, then there are lot of=20 > things that ought to be re-engineered if substantial work is going to be= =20 > done, and using Obj'Image is down in the noise. Well, that is a money question. I cannot justify too radical changes, without a firm return on investment paper. Obj'Image will not cause redesign. But sure, a complete redesign would be nice. But chances are=20 that the decision will be : use C++ for the redesign, so=20 I am a bit careful with that. >=20 > BTW, your proposal is a lot like the way stream attributes work, and that= =20 > has proven to be a massive can-of-worms. The entire mess about availabili= ty=20 > of stream attributes comes about because of the ability of different view= s=20 > to have a different ideaa of whether an attribute is legal or not. This i= s=20 > not a trivial idea (nor is the one in AI12-0020-1). I do not see the connection. Is it legal to use T'Image(Value)=20 then why would not Value'Image be valid? It seems (to me) that gnat did figure that out, with Value'Img >=20 > (Also note that providing 'Image implies providing a matching 'Value, jus= t=20 > like providing 'Write implies providing 'Read. 'Value is a lot messier th= an=20 > 'Image, in general.) I can see that. But I suggested Img/'Image only. Not 'Value. =20 /Bj=F6rn =20