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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.230.3 with SMTP id su3mr46160293obc.6.1438257108771; Thu, 30 Jul 2015 04:51:48 -0700 (PDT) X-Received: by 10.140.25.211 with SMTP id 77mr626489qgt.41.1438257108746; Thu, 30 Jul 2015 04:51:48 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!pg9no5309777igb.0!news-out.google.com!4ni83174qgh.1!nntp.google.com!69no2792992qgl.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 30 Jul 2015 04:51:48 -0700 (PDT) In-Reply-To: <1438244829.17005.26.camel@obry.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.203.145.32; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 NNTP-Posting-Host: 81.203.145.32 References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <1438244829.17005.26.camel@obry.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0a8104af-4ebb-4d82-92e5-6ba7289272ce@googlegroups.com> Subject: Re: Running a preprocessor from GPS? From: EGarrulo Injection-Date: Thu, 30 Jul 2015 11:51:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:27197 Date: 2015-07-30T04:51:48-07:00 List-Id: On Thursday, July 30, 2015 at 10:27:12 AM UTC+2, Pascal Obry wrote: > Le mercredi 29 juillet 2015 =E0 15:32 -0700, EGarrulo a =E9crit : > > But is this a valid excuse? Aren't programming languages supposed to > > let programmers write useful programs?=20 >=20 > You mean useful and unsafe. No thanks. No, I mean useful and safe. Yes, thanks ;) > Nobody should care about programmers' fingers! Verbosity is one of the > strength as it makes the code far more *readable*. And remember that a > piece of code is written once and read many times during the > application lifetime. Exactly! And: Printf ("Mr %Arg you have won %Arg dollars!\n", Surname, Amount); is much more readable than: Put ("Mr "); Put (Surname); Put (" you have won "); Put (Amount); Put (" dollars!"); New_Line; Now, multiply this for all the times that your program needs to print formatted text... Not to mention that the order of the arguments is hard-coded in the valid Ada snippet, whilst you could need a different order to support formatted output in different languages. >=20 > > If Ada offered runtime typing by means of a type `Any`, then `Printf` > > could be trivially written as: > >=20 > > type Printf_Arguments is array (Positive range <>) of Any; > > =20 > > procedure Printf (Format : String; Arguments : Printf_Arguments); >=20 > This can be accomplished by libraries, an example is > GNAT.Formatted_String. But there is other implementations around. Then why are we discussing this? The answer is that Ada does=20 support formatted output. It is strange that this doesn't come with the st= andard, but that is it. the standard