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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!tl-20b.arpa!Rudisin From: Rudisin@TL-20B.ARPA (Jerry Rudisin) Newsgroups: net.lang.ada Subject: text_io problems Message-ID: <8509172214.AA04519@UCB-VAX.ARPA> Date: Tue, 17-Sep-85 13:38:58 EDT Article-I.D.: UCB-VAX.8509172214.AA04519 Posted: Tue Sep 17 13:38:58 1985 Date-Received: Fri, 20-Sep-85 05:02:27 EDT Sender: daemon@ucbvax.ARPA Organization: The ARPA Internet List-Id: Something that has always struck me as incredibly inconvenient about Ada IO is the fact that it does not offer the convenience and simplicity of things like C's printf or the richer IO facilities in PL/1 and FORTRAN. Formatting a page of output, or even printing a series of variables and descriptive information for debugging purposes is a real pain in Ada because of the need to use numerous simple calls. Unfortunately there is no easy way to get around this limitation. Within limits you can synthesize a printf type mechanism by defining a bunch of overloaded IO routines with different combinations of argument types. However, one quickly reaches a combinatorial explosion in trying to build a really useful facility (i.e., to handle arbitrary combinations of (exactly) 10 parameters of 4 different base types requires 4 ** 10 overloaded declarations). Likewise, you could build an IO package using "union types" synthesized out of variant records and unchecked conversion, but this is dangerous and inconvenient for a user. So, we are pretty much stuck with a cumbersome IO mechanism. I am not proposing any changes to the language to address this, since there are good reasons for the limitation. Though well defined in the ARM, the IO packages are not really part of the language in the sense that they are packages like any other, not to be implemented by special features such as routines with variable numbers of parameters. For a variety of good reasons, variable number of parameters are not permitted. This comment is simply to express my own annoyance at this unpleasant feature of Ada IO, since the subject has been raised, and to ask Ada users familiar with other languages if this bothers them as well. I have had surprisingly strong negative reactions to this aspect of Ada when I describe it to novice Ada programmers. Jerry Rudisin Tartan Laboratories -------