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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Fri, 12 Apr 2013 13:46:21 +0200 Organization: cbb software GmbH Message-ID: <1pt6x8kuyyrc4$.fkrabsc77z66$.dlg@40tude.net> References: <1gnmajx2fdjju.1bo28xwmzt1nr.dlg@40tude.net> <3gv2jwc95otm.pl2aahsh9ox8.dlg@40tude.net> <1gkxiwepaxvtt$.u3ly33rbwthf.dlg@40tude.net> <1fmcdkj58brky.bjedt0pr39cd$.dlg@40tude.net> <1bj564vat3q1j$.1s4d00rlzx4ux$.dlg@40tude.net> <8bj2k30k7i19.w7ehsldwbf7x.dlg@40tude.net> <1o34nhpfuy6yl$.2orlukd1elr7.dlg@40tude.net> <5167d6c6$0$6633$9b4e6d93@newsspool2.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2977 Xref: number.nntp.dca.giganews.com comp.lang.ada:181033 Date: 2013-04-12T13:46:21+02:00 List-Id: On Fri, 12 Apr 2013 11:41:25 +0200, Georg Bauhaus wrote: > On 12.04.13 10:17, Dmitry A. Kazakov wrote: >>>>> For instance, I tend to write out the entire name of the conversion >>>>> >>>between string and unbounded string: >>>>> >>> >>>>> >>> Ada.Text_IO.Put_Line (Ada.Strings.Unbounded.To_String (My_Object)); >>>> >> >>>> >>Hideous. What kind of information this mess should convey to the reader? >>>> >>2/3 of it is noise. My_Object is a string, why Put_Line does not handle >>>> >>it? >>> > >>> >It's a "string", not a String. >> And*semantically* the difference is? > > The difference is in the meaning that one assigns to "String". > "One" refers to one of two minds performing the assignment: > > (a) he who considers a program as per how Ada is defined, > literally. > > (b) he who considers a program in terms of definitions that > underlie the the definition of Ada, though not literally. I gather that in your opinion: 1. There is no semantic difference between String and Unbounded_String. 2. Somehow from literal and non-literal considerations it follows that Ada.Text_IO.Put_Line (Ada.Strings.Unbounded.To_String (My_Object)); is better/clearer/safer/more efficient than Ada.Text_IO.Put_Line (My_Object); How exactly Put_Line is good with String and bad with Unbounded_String? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de