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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5212284fdbcb2b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 16:56:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.isc.org!agilent.com!sdd.hp.com!usc.edu!newspeer.cts.com!galanthis.cts.com!127.0.0.1.MISMATCH!not-for-mail Sender: kst@king.cts.com Newsgroups: comp.lang.ada Subject: Re: New to ada, a few questions References: From: Keith Thompson Date: 05 Aug 2002 16:56:20 -0700 Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 NNTP-Posting-Host: 209.68.192.180 X-Trace: 1028591780 nntp.cts.com 90824 209.68.192.180 Xref: archiver1.google.com comp.lang.ada:27737 Date: 2002-08-05T16:56:20-07:00 List-Id: Stephane Jolicoeur writes: > *** post for FREE via your newsreader at post.newsfeed.com *** > > Hello, > I am a strong python programmer that is looking for a compiled language to > complement my tool chest. I tried C but those pointers are an annoyance, I > tried C++ but there to the pointers and it's OO weirdness kicked in. Then I > stumbled on an Ada tutorial, I dislike the Pascal-like coding style but > there seems to be no pointer and it can be compiled to native byte code ! > I would like to know, what good books are there for learning ada ( some > sort of tutorial/reference book). How "fast" is compiled Ada code by this I > mean is it like C/C++ or more like Java? I read that it is possible to > interface Ada with C? How is this done? Can I use say stdio.h in an Ada > program? How about interfacing with C++ or objective C? Are there any GUI > librairies (windows, BSD, Mac OS X)? Has any Ada compiler been made to > compile code for microcontrollers ( PIC, 68hc11, etc )? How does the > threading work? I think this should suffice for a first post. Ada does have pointers; it calls them access types. They're not needed nearly as often as they are in C. For example, if you want to pass a parameter by reference, you just pass it; there's no need to use a pointer type. Array types are array types. The bounds of an array are fixed when the object is created, but they can be determined at run time; again, there's no need to use pointers. Even when you do use pointers, it's much easier to do so safely. Pointer arithmetic, a major source of undefined behavior in C, is not built into the language, and is almost never necessary. Of course you can shoot yourself in the foot, but it's harder to do so; the safety is on by default and you have to say "I want to turn off the safety now, and I know it's dangerous." before you disable it. No, you can't use directly (Ada doesn't grok C syntax), but Ada does have good facilities for interfacing to other languages, with predefined support for C, Fortran, and Cobol, and compiler-specific support for C++. Of course, Ada has its own I/O packages, so there's seldom any need to interface to the facilities defined in . -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Schroedinger does Shakespeare: "To be *and* not to be"