comp.lang.ada
 help / color / mirror / Atom feed
From: Laurent <lutgenl@icloud.com>
Subject: Re: What do you think about this?
Date: Wed, 24 Jun 2015 13:50:27 -0700 (PDT)
Date: 2015-06-24T13:50:27-07:00	[thread overview]
Message-ID: <78882aed-4063-409b-a92e-6025c3097a52@googlegroups.com> (raw)
In-Reply-To: <mmeoq7$p9f$1@dont-email.me>

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
> 
> * 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 where 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 there.

> * Inconsistent indentation

Where? Why? I don't pay special attention to the indentation. Type something, 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 procedures
> names that are verb phrases (such as Make_File_Name); boolean functions,
> predicates (Empty or Is_Empty); and other functions, noun phrases (File_Name).
> File_Name would be a better name for this function.

Hm yes I thought already about that. Because Test_Antibiotique: Antibiotiques.Antibiotique := Antibiotique.Antibiotique.Make_Antibiotique (is a function) 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 creates
> its result as a String, then converts it to a bounded string before returning
> 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 String.
> 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 Strings and I am quite pissed because of that. The bounded one is doing the things automagically, like I think it should be. But thats only my opinion. The only thing which is missing is an automagical adaption of the length. 

Sort of a dynamical allocating:

So Example_A : Bound_String := "123" so the Example_A'Length = 3
Example_B: Bound_string:= "Only a test"  Example_B'Length = 11

Without having to define a maximum length in an instantiation before you can 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. 

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.  

Thanks

Laurent


  reply	other threads:[~2015-06-24 20:50 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21 18:38 Is there an easier way for this? Laurent
2015-06-21 19:15 ` Niklas Holsti
2015-06-21 19:41   ` Laurent
2015-06-21 19:25 ` Jeffrey R. Carter
2015-06-21 19:42   ` Laurent
2015-06-22 12:23   ` Laurent
2015-06-22 15:01     ` G.B.
2015-06-22 15:40       ` Laurent
2015-06-22 16:47     ` Jeffrey R. Carter
2015-06-22 16:41   ` Laurent
2015-06-22 16:47     ` Jeffrey R. Carter
2015-06-22 17:18       ` Laurent
2015-06-22 18:04         ` What do you think about this? Laurent
2015-06-23 14:21           ` Stephen Leake
2015-06-23 19:51             ` Laurent
2015-06-23 20:20               ` Anh Vo
2015-06-23 21:03                 ` Laurent
2015-06-23 22:17                   ` Shark8
2015-06-24  5:57                     ` Anh Vo
2015-06-24  7:58                       ` Laurent
2015-06-24 21:06                       ` Laurent
2015-06-24 21:45                         ` Anh Vo
2015-06-24 21:59                           ` Laurent
2015-06-24 22:35                           ` Simon Wright
2015-06-24 22:59                             ` Laurent
2015-06-25  2:56                               ` Anh Vo
2015-06-25  7:29                               ` Simon Wright
2015-06-25 16:55                                 ` Anh Vo
2015-06-25 17:27                                   ` Simon Wright
2015-06-25 18:13                                 ` Laurent
2015-06-25 18:36                                   ` Simon Wright
2015-06-24 23:10                             ` Anh Vo
2015-06-24 10:17               ` Stephen Leake
2015-06-24 17:20                 ` Jeffrey R. Carter
2015-06-24 20:50                   ` Laurent [this message]
2015-06-24 22:30                     ` Jeffrey R. Carter
2015-06-24 22:52                       ` Laurent
2015-06-27 17:12                       ` Laurent
2015-06-27 17:43                         ` Jeffrey R. Carter
2015-06-27 17:47                         ` J-P. Rosen
2015-06-27 18:54                         ` Simon Wright
2015-06-27 19:37                           ` Laurent
2015-06-27 19:47                             ` Jeffrey R. Carter
2015-06-27 20:39                             ` Simon Wright
2015-06-28  4:45                             ` J-P. Rosen
2015-06-28 14:08                         ` Stephen Leake
2015-06-28 16:10                           ` Laurent
2015-06-25 13:16                   ` Stephen Leake
2015-06-25 17:20                     ` Jeffrey R. Carter
2015-07-02 21:51                       ` Randy Brukardt
2015-07-03 12:31                         ` Stephen Leake
2015-07-03 17:11                           ` Laurent
2015-07-03 17:46                             ` Jeffrey R. Carter
2015-07-03 18:49                               ` Laurent
2015-07-04  3:26                                 ` Randy Brukardt
2015-07-03 19:17                             ` Simon Wright
2015-07-04  3:30                               ` Randy Brukardt
2015-07-04  4:19                                 ` Laurent
2015-07-04  7:43                                   ` Simon Wright
2015-07-04  9:07                                     ` Laurent
2015-07-04  7:42                                 ` Simon Wright
2015-07-05  0:56                                   ` Randy Brukardt
2015-07-03 17:35                           ` Randy Brukardt
2015-07-05 13:55                             ` Stephen Leake
2015-07-06 20:07                               ` Randy Brukardt
2015-06-24 20:21                 ` Laurent
2015-06-21 19:38 ` Is there an easier way for this? Pascal Obry
2015-06-21 19:54   ` Laurent
2015-06-21 20:39     ` Pascal Obry
2015-06-24  7:14 ` gautier_niouzes
2015-06-24 21:08   ` Laurent
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox