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.156.7 with SMTP id lk7mr12013540icc.22.1435179027660; Wed, 24 Jun 2015 13:50:27 -0700 (PDT) X-Received: by 10.140.101.22 with SMTP id t22mr449469qge.32.1435179027629; Wed, 24 Jun 2015 13:50:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h15no8118083igd.0!news-out.google.com!4ni2663qgh.1!nntp.google.com!z60no3132384qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 24 Jun 2015 13:50:27 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.99.95.58; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 83.99.95.58 References: <9894cde7-2cf8-4060-be65-857812ad7b09@googlegroups.com> <17436268-aceb-461f-bdcf-eee8436cd0e6@googlegroups.com> <86y4jaqzdx.fsf@stephe-leake.org> <86oak5qulb.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <78882aed-4063-409b-a92e-6025c3097a52@googlegroups.com> Subject: Re: What do you think about this? From: Laurent Injection-Date: Wed, 24 Jun 2015 20:50:27 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26458 Date: 2015-06-24T13:50:27-07:00 List-Id: On Wednesday, 24 June 2015 19:20:28 UTC+2, Jeffrey R. Carter wrote: > I only looked at the main-program procedure, but my comments are >=20 > * Inconsistent use of blank lines Where? What would be a consistent use? I remember reading some online text = about the correct formatting and whatever but I have already forgotten wher= e and what. If you a referring to the declaration of the different objects = inside the Generate procedure, well those I would like to hide beneath the = carpet because it looks awful. Not sure if the compiler will find them ther= e. > * Inconsistent indentation Where? Why? I don't pay special attention to the indentation. Type somethin= g, select it and Tab. GPS makes the rest. Sometimes that fails completely. > There's a function named Make_File_Name. A good guideline is to give proc= edures > names that are verb phrases (such as Make_File_Name); boolean functions, > predicates (Empty or Is_Empty); and other functions, noun phrases (File_N= ame). > File_Name would be a better name for this function. Hm yes I thought already about that. Because Test_Antibiotique: Antibiotiqu= es.Antibiotique :=3D Antibiotique.Antibiotique.Make_Antibiotique (is a func= tion) looks terrible, is too long and somehow redundant. Antibiotique.Make = would be clear enough. So thanks for confirming that point. > The function returns a bounded string, but the only place it's used takes > String, and so involves a conversion of the result. The function itself c= reates > its result as a String, then converts it to a bounded string before retur= ning > it. This may be confusing to the reader; I looked around a bit for other = uses, > trying to figure out why it was returning a bounded string rather than St= ring. > For this reason (not efficiency), I'd recommend that the function return = String. It is returning a bounded String because I have problems with types of Stri= ngs and I am quite pissed because of that. The bounded one is doing the thi= ngs automagically, like I think it should be. But thats only my opinion. Th= e only thing which is missing is an automagical adaption of the length.=20 Sort of a dynamical allocating: So Example_A : Bound_String :=3D "123" so the Example_A'Length =3D 3 Example_B: Bound_string:=3D "Only a test" Example_B'Length =3D 11 Without having to define a maximum length in an instantiation before you ca= n actually use it. But it should be possible to modify it later on.(IIRC in= Java it is different) And being the same type so that no conversion at all= is required. Perhaps Standard.Strings is doing that? No idea.=20 But that is probably not possible because of the flame/whine/rant that will= start. I know that the automagic belongs to the realm of fantasy. =20 Thanks Laurent