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,9c86eb13dd395066 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Portable Code (was: CRC in Ada?) Date: 1997/03/24 Message-ID: <1997Mar24.081622.1@eisner>#1/1 X-Deja-AN: 227942491 X-Nntp-Posting-Host: eisner.decus.org References: <1997Mar2.220652@nova.wright.edu> <331bf6ce.2832564@news.logica.co.uk> <332B5EBD.3D9E@worldnet.att.net> <332C9185.61C1@worldnet.att.net> <332F5CC8.6D7C@worldnet.att.net> <3332CA3D.379F@bix.com> <3335D8F0.106F@bix.com> X-Nntp-Posting-User: KILGALLEN X-Trace: 859209413/27142 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-03-24T00:00:00+00:00 List-Id: In article <3335D8F0.106F@bix.com>, Tom Moran writes: > Sorry, >> couldn't read a sequential file > should have said "couldn't read an existing sequential file". Having > learned Ada after leaving school, I was interested in using it in the > real world, not in a classroom excercise. I assume there are others who > are doing real tasks and might give Ada a try, but not much of one if > Ada appears, rightly or wrongly, highly unsuitable. I think there is a dichotomy of specification standards, in that those discussing Ada often presume "in a portable fashion" as being a requirement. Over and over again I read messages from C programmers who are shocked that their traditional IO methods cannot read an "ordinary" VMS file without resorting to particular OS-specific file opening methods. Discussions in c.l.a tend to favor consideration of portability _before_ the source code is first written. That approach is not appropriate in the C world, which has a cultural bias toward "knowing" that every operating system will be "Unix" (whatever that means this month). For "real-world" problems in Ada based on an existing environment, it is quite possible to write non-portable code. Ada is quite fine for writing bales of code full of calls to highly non-portable VMS system services. I bet it works just as with non-portable calls to OS/2. Consideration of a language should not be biased by the fact that the problem itself does not admit of a portable solution. If you think C is better than Ada for portable code, please first make sure your C program never uses "#if" for platform distinctions. Otherwise we are not talking about portable source but rather how the non-portable source is arranged into files. Larry Kilgallen