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=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,54c513170bafd693 X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Desirability of C++ Date: 2000/05/03 Message-ID: <8epnc0$rtn$1@wanadoo.fr>#1/1 X-Deja-AN: 618771689 References: <390DEC7F.9429C82C@online.no><390E2A20.B647D0D6@maths.unine.ch> <8em8mb$evd$1@wanadoo.fr><390EEF24.BD36AA24@maths.unine.ch> <8eonmi$e4q$2@wanadoo.fr> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 957374656 28599 193.250.43.170 (3 May 2000 17:24:16 GMT) Organization: Adalog X-MSMail-Priority: Normal NNTP-Posting-Date: 3 May 2000 17:24:16 GMT Newsgroups: comp.lang.ada Date: 2000-05-03T17:24:16+00:00 List-Id: Robert A Duff a �crit dans le message : wcc66svllos.fsf@world.std.com... > "Jean-Pierre Rosen" writes: > > > In this example, the question is whether this very simple functionnality was > > worth presenting a fourth variation of strings. > > Well, it wouldn't have been a *fourth* one. If we had chosen to do it > your way, it would have been *instead* of the bounded strings package we > ended up with. Therefore, it would not have added complexity. The > issue was purely whether assignment should fail at run time (as in your > version) versus prevented at compile time (the RM version) -- that > issue, traded off against the extra annoyance of having to instantiate > the thing all over the place. > Once again, bounded strings are great when they are used as a *representation* of some higher level concept. If you instantiate it for the Last_Name of your client data base, you don't want to be able to assign a Last_Name to a Street_Address. Analyses of the problem is required to define what is the proper length for Last_Name, and all Last_Name should have the same maximum length. The issue is different if you see strings as -say- an input buffer. In that case, regular strings, or perhaps Unbounded_Strings, might be more fit. Actually, I don't use my Variable_String that much, except in one case: when playing with annex E, because they fit the remote_types profile, and Unbounded_Strings don't. -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog