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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-02 18:55:43 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: aek@vib.usr.pu.ru (Alexander Kopilovitch) Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: 2 Oct 2003 18:55:43 -0700 Organization: http://groups.google.com Message-ID: References: <3F739C1D.4030907@attbi.com> <3F78E850.8010401@comcast.net> <3F797748.3000203@noplace.com> <3F7AC1B4.304@noplace.com> <3F7B0FE2.6010906@comcast.net> <3F7C7943.9040509@comcast.net> NNTP-Posting-Host: 213.33.245.29 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1065146143 5813 127.0.0.1 (3 Oct 2003 01:55:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 3 Oct 2003 01:55:43 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:139 Date: 2003-10-02T18:55:43-07:00 List-Id: Robert I. Eachus wrote: > If I could wave a magic wand and convince Alexander of the close > relationship between String, Unbounded_String, and Bounded_String, I > would. They are certainly closely related at the implementation level and in the language documentation. But only relation between them at the specification level is a set of conversions, and no more. This relation is too weak to be applied automatically, and it leads to the necessity of explicit conversions. > A: String := "ABC" & 'd'; > B: My_Bounded_String := "abc" & 'D' & Null_Bounded_String; > C: Unbounded_String := "Abc" & 'd' & Null_Unbounded_String; >... > if renaming To_Unbounded_String, and To_String as "+" > will make you happy, feel free. Yes, we can almost hide those conversions, either by catenation with Null_*, or by that "+", but never entirely - there always will be clearly visible stamp. What does it mean, that stamp? - well, let's see either in docs or in implementation... perhaps someone was creative enough to "enhance" its meaning. > Oh, and not all of the potential implicit conversions are defined, just > like all the possible catenation operators are not defined, because > going any further would tend to make lots of straightforward expressions > ambiguous. Yes, I understand that perfectly. I do not think that this issue is important to anyone who already decided to use Ada anyway (or who already is fluent in Ada). For those people it is just one of those slight irregularities, which you inevitably find in any real programming language. But for many programmers who are neither fluent in Ada nor forced to use Ada (for any reasons), and who are in position to determine their attitude to Ada (and to do that relatively quickly), this issue easily may be among the critical ones, and it may lead to early rejection. Not because those programmers find it too hard to write explicit conversions, but because they suspect that those conceptually unnecesessary conversions are signs of some unfriendliness of the language... and they quit with the usual sentence: "Ah, Ada - it's a language for military only". Well, I would not pursue this issue if it concerns popularity (of Ada) only. But I believe that this is indeed a violation of Ada's purpose for type system. The question is whether this violation is significant enough to justify efforts needed for correction. My remark about popularity is for proper view on this subject. Then, I understand that such a correction can't be a simple job, as it must not break many existing relations and concepts involved. Nevertheless, I think that there is a proper way to do that - by introducing an entirely new kind of relation between types. I can even propose a form, but I surely can't work out all related issues - I'm not a language lawyer. (I actually proposed that form more than a year ago in Ada-Comment, and Robert Duff replied with a list of questions, which reminded me one Russian play "Dragon", where Dragon said to Knight: "I will take you seriously, I will annihilate you immediately." -;) I understand that the String issue is certainly insufficient reason for such a major move as introduction of new kind of relation between types, but it is my feeling (well, pure feeling, no more), that this new kind of relation may be useful in other situations also. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia