comp.lang.ada
 help / color / mirror / Atom feed
From: guerby@gnat.com (Laurent Guerby)
Subject: Re: overload ":=" ???
Date: 1996/07/21
Date: 1996-07-21T00:00:00+00:00	[thread overview]
Message-ID: <ws9d91pcshi.fsf@schonberg.cs.nyu.edu> (raw)
In-Reply-To: 4soh73$56h@newsbf02.news.aol.com


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 <guerby@gnat.com>, Team Ada.
   "Use the Source, Luke. The Source will be with you, always (GPL)."




  parent reply	other threads:[~1996-07-21  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-17  0:00 overload ":=" ??? David Morton
1996-07-17  0:00 ` Robert Dewar
1996-07-18  0:00   ` David Morton
1996-07-19  0:00     ` David Weller
1996-07-19  0:00     ` Brad Balfour
1996-07-18  0:00   ` Laurent Guerby
1996-07-25  0:00   ` Wolfgang Gellerich
1996-07-25  0:00     ` Robert A Duff
1996-07-18  0:00 ` Jon S Anthony
1996-07-18  0:00 ` John Herro
1996-07-18  0:00   ` Robert Dewar
1996-07-19  0:00     ` John Herro
1996-07-21  0:00       ` David Morton
1996-07-21  0:00       ` Laurent Guerby [this message]
1996-07-22  0:00         ` Robert A Duff
1996-07-23  0:00           ` Laurent Guerby
1996-07-23  0:00             ` John Herro
1996-07-23  0:00             ` Robert A Duff
1996-07-22  0:00       ` David Morton
1996-07-22  0:00         ` Robert Dewar
1996-07-23  0:00         ` Robert A Duff
1996-07-22  0:00           ` Robert Dewar
1996-07-22  0:00       ` Laurent Guerby
1996-07-22  0:00       ` Laurent Guerby
1996-07-23  0:00       ` Tarjei Jensen
1996-07-23  0:00         ` Robert A Duff
1996-07-24  0:00       ` Robert I. Eachus
1996-07-19  0:00 ` Joerg Ozimek
replies disabled

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