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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45abc3b718b20aa3 X-Google-Attributes: gid103376,public From: mfb@mbunix.mitre.org (Michael F Brenner) Subject: Re: Two ideas for the next Ada standard Date: 1996/08/30 Message-ID: <506svr$h1v@linus.mitre.org>#1/1 X-Deja-AN: 177428050 references: <5009h5$ir4@netline-fddi.jpl.nasa.gov> <506ceh$25o4@info4.rus.uni-stuttgart.de> organization: The MITRE Corporation, Bedford Mass. newsgroups: comp.lang.ada Date: 1996-08-30T00:00:00+00:00 List-Id: In additions to these two ideas, we should consider two more: (1) Efficiencies required for systems programming: (1a) Permit placing a variable at an absolute physical machine address (as opposed to a gnat virtual address). (1b) Correct the language design error that CHECKED conversion between signed and unsigned integers may overflow or raise constraint_error. (1c) Add logical operations (AND, OR, etc.) on signed numbers. (1d) Make software reuse through generics efficient by REQUIRING all expressions that would have been static in a non-generic package to remain static when the package is made generic. In Ada-95, you lose staticness all over, and, consequently, you lose compile time computation of most expressions, when you make a package generic. (1e) Mandate a compiler-independent way to identify a procedure as the interrupt handler for a given interrupt number. (1f) Mandate a standardized way to identify that an INTERFACE parameter is to be passed by reference. (1g) Legalize a compiler-independent way to overlay two variables. This could be accomplished without offending non-system-programming purists, who are rightfully concerned with the safety violation implied by overlaid variables in two steps as follows. First, mandate that unchecked_conversions generate no code, and recommend that they be optimized away whenever the compiler detects the possibility of doing so. Second, in the tradition of searchable keywords like SYSTEM, CLASS, and UNCHECKED_DEALLOCATION, use pragma OVERLAID to document the fact that a variable MUST be optimized away. Alternately, just change the wording of the manual from making overlaid variables erroneous to making them a safety concern that must be tested carefully. (1h) A FAST, mandatory, standarized way to put a stream of bytes out to a file, with no intermediate packages or code between the Ada call and the underlying file system WRITE and READ commands, giving random access to standard_input and the same I/O speed as competing languages, which now requires compiler dependent code. (2) Make packages into second-class objects; currently they are third-class objects, forbidding arrays of packages and forbidding passing packages as generic parameters; a second-class package would permit passing non-generic packages as generic parameters, which permit an easy-to-read, easy-to-implement, very efficient method of creating iterators with a single level of generics across a wide set of data structures. (3) I suggest calling the next version 2kX, in honor of the year 2000 problem which will be biting CALENDAR software whose date limitations arise in the neighborhood of 1999 plus or minus a hundred year sliding window.