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 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,76878622fd40c57 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-16 18:50:49 PST Path: nntp.gmd.de!xlink.net!news.dfn.de!Germany.EU.net!howland.reston.ans.net!pipex!uunet!gwu.edu!gwu.edu!not-for-mail From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: Re: GNAT-Problem Set_Line(), Set_Col() Date: 16 Nov 1994 21:50:49 -0500 Organization: George Washington University Message-ID: <3aege9$bhn@felix.seas.gwu.edu> References: <395jba$kbs@tucs6.rz.tu-cottbus.de> <3aad5q$qn9@watnews1.watson.ibm.com> <3aari4$jlc@felix.seas.gwu.edu> NNTP-Posting-Host: 128.164.9.3 Date: 1994-11-16T21:50:49-05:00 List-Id: In article , Keith Thompson wrote: >In <3aari4$jlc@felix.seas.gwu.edu> mfeldman@seas.gwu.edu (Michael Feldman) writes: > >Well, I'd like to think of myself as an "Ada Wise Person". 8-)} Of course! >On some targets, you might want type Integer to be only 16 bits (this >was probably more true in 1983 than it is now, but it's still allowable). >Having Text_IO blow up on text files longer than 32767 lines would have >been A Bad Thing (though I suppose that, with careful implementation, >it wouldn't necessarily blow up unless you try to set or query the >current line number). >Overuse of the predefined types is considered (by many) to be bad style >anyway, since it weakens Ada's strong type checking. It's too bad when >that checking complains about something that's actually safe, but that's >the price we pay for having the compiler detect more of our mistakes. Well, certainly. This is the standard lecture we give each other about the predefined types - indeed, I've given it a number of times myself. :-) But as Norm Cohen pointed out, it is not obvious that Line and Col are of the _same_ type. And it's easy to see, in this context, why some folks have complained that the index type of String is Positive. I agree that files should be allowed have more than 32767 lines; by that argument, why restrict Strings to 32767 characters? I think that a consistent approach would have been much clearer and easier to justify to others. Oh well. In the order of things, it's a small issue, just fun to debate on the net. :-) Thanks for setting it out, Keith. Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet) ------------------------------------------------------------------------ Ada on the World-Wide Web: http://lglwww.epfl.ch/Ada/ ------------------------------------------------------------------------ "Non illegitimi carborundum." (Don't let the bastards grind you down.) ------------------------------------------------------------------------