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,ac7b7bb8bd6ab254 X-Google-Attributes: gid103376,public From: Andre Spiegel Subject: Re: GNAT for Unix systems programming? Date: 1997/03/11 Message-ID: #1/1 X-Deja-AN: 224656427 Sender: spiegel@moon References: <5g3iao$agt@fg70.rz.uni-karlsruhe.de> Organization: Freie Universitaet Berlin X-Access: 16 17 19 Newsgroups: comp.lang.ada Date: 1997-03-11T00:00:00+00:00 List-Id: Thomas Koenig writes: > I'd like to know how good GNAT is for systems programming under > Unix, especially for networking. I've used GNAT for low-level network programming under UNIX, and my experiences are very good. As far as I know, there are no standard bindings in these areas, so you normally need to import those definitions that you actually need yourself. However, I've found that with a good, not-too-thin Ada binding (even if I have to create it myself), I get much clearer, more robust code than if I write the same thing in C. It is definitely worth the effort, in my opinion. Andre Spiegel Free University of Berlin PS. By "not-too-thin Ada binding" I mean basically two things: (a) Try to avoid System.Address, (b) let your binding functions raise exceptions if anything goes wrong, so that you needn't do C-type checking of return values, which is pretty tedious and easily forgotten. The nice thing about GNAT in particular is that it interfaces so cleanly and predictably with the C side.