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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9fb64e4c58f1fe X-Google-Attributes: gid103376,public From: guerby@gnat.com (Laurent Guerby) Subject: Re: overload ":=" ??? Date: 1996/07/21 Message-ID: #1/1 X-Deja-AN: 169319079 sender: guerby@schonberg.cs.nyu.edu references: <4soh73$56h@newsbf02.news.aol.com> organization: New York University reply-to: guerby@gnat.com newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: David> like my example: [...] You don't have to do write anything to use this kind of data structures in Ada 95, there's a language-defined package called Ada.Strings.Bounded that does exactly what you want, RM95-A.4.4. David> a := To_Text("test"); -- seems too wordy If you are in a race where the goal is to type the minimal number of character to write your code, I can tell you: ada is not the right language (except in the case of parallelism since it's built in in the language), use C/Fortran/C++/whatever and have a look at the obfuscated C/C++ contests. In this case, you can write in Ada: function "+" (X : String) renames To_Text; -- or whatever a := +"test"; David> If that can't be done, then, IMHO, there is *one* way that C++ David> is better... but the only one so far. If way = "type less characters", then you're right. David> why is this so hard to implement?? If this = "the data structure", it's zero cost to implement it since it's already in the language. (Oh well, I guess it's very hard since it requires you learn Ada 95 and not just try to translate C++ in pseudo-Ada). -- Laurent Guerby , Team Ada. "Use the Source, Luke. The Source will be with you, always (GPL)."