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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7b3c720a19fbb26f X-Google-Attributes: gid103376,public From: Nick Roberts Subject: Re: What Mac developers think of Ada ! Date: 1999/10/31 Message-ID: <381CCC72.72F80210@callnetuk.com> X-Deja-AN: 542939091 Content-Transfer-Encoding: 7bit References: <381A0466.2137859E@mbox5.singnet.com.sg> X-Original-NNTP-Posting-Host: da132d190.dialup.callnetuk.com X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 1 Nov 1999 03:10:14 GMT, da132d190.dialup.callnetuk.com Organization: Computer Consultant MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-10-31T00:00:00+00:00 List-Id: Siow Wey Hua, I applaud your sending in this question to the Darwin mailing list (and I think many other on comp.lang.ada will too). Every time someone like yourself asks awkward questions about why people use outdated languages for outdated reasons helps the cause of improving software in the world, even if just a little. And, because you are not in the Ada 'camp', as it were, your questioning has more authority, in effect, than ours could. Please keep asking! I can think of a few answers to the objections raised by those who responded to your question. Please, by all means, put my responses here to the mailing list. ========== > b) means everything would have to be reoptimized from scratch, A dubious statement. Most of the 'optimizations' in question would carry directly over in the translation. The remainder would probably be outshone by the improvement in speed obtained simply by rewriting in Ada. > c) C and Unix are like Strawberries and Champagne, they belong > together. Historically, C and UNIX are, of course, intimately bound up with one another. However, Ada 95 has excellent facilities for interfacing with C (no worse than for C itself), largely obviating this objection. > Further, strongly typed and dynamic OOP are for the most part at odds > with > each other. Ada may be able to replace C++, but it's hardly a fit > replacement for the task ObjC is supposed to do. > Your suggestion would be much more fit when we were talking about > OpenVMS, than when talking about a Unix OS with an dynamic OOP > environment. Misses the point completely. There are large sections of BSD that are not - and could not sensibly be - implemented with a dynamic OOP language/environment. These are the parts that could and should be rewritten in Ada. In addition, much of the infrastructure for a rich dynamic OOP environment could also be written (or rewritten) in Ada. A dynamic OOP language (preferably a well established one, like SmallTalk for example) could then be used to provide the 'upper layers' of the overall system (a scheme of which I, personally, thoroughly approve). > In terms of portability Ada is beaten by C, Java, Cobol..., In terms of availability of compilers, Ada is beaten by C. But in terms of portability of code written in a certain language, Ada beats C (hands down). The same is true, to a lesser extent, of Ada versus Java and C++. I don't think COBOL is really relevant to the issue. > in terms of reusability by SmallTalk, ObjC, etc. Again, dynamic OOP languages are irrelevant. There is difference in reusability between Objective C and Ada. However, Ada has the acknowledged advantage of fully differentiating the namespace system from the type system (which ObjC and C++ do not). > and in terms of reliability by a slew of smaller languages. Which are all inadequate for the (entire) job *because* they are too small. Using specialist languages for specialized parts of OS should not be precluded. But for the bulk of it, a general purpose language is necessary. > Ada is huge, and thus the likelyhood of having bugs in the compiler > etc. are much higher than for a small, lean and mean language. A ludicrous statement, in view of the numerous bugs to be found in C and (especially) ObjC and C++ compilers. Standard Ada 95, as a language, is smaller and simpler than standard C++ and much smaller than Java with its (standard) libraries. Much of the greater size of Ada compared to C is in the addition of functionality that is provided by library functions in C (e.g. multi-tasking). Consider the multi-tasking support inherent in the Ada 95 language: it puts C to shame, and is hardly irrelevant to the application domain of a multi-tasking operating system! > For application programming ADA may or may not be appropriate, > depending on how much dynamism is required. Interfacing ADA to Cocoa > wouldn't be exactly trivial... Ada is primarily a systems programming language (more so than C, ObjC, or C++), and interfacing to Cocoa would be straightforward (but not trivial, of course). > Two words: Zero Mindshare. Two words: closed mind. ========== To recap, the arguments that languages such as SmallTalk are preferable to Ada are irrelevant; the parts of the operating system rewritten in Ada would be 100% complementary to the parts that would be written in such languages. One of the respondents seemed to think that Objective C has some kind of dynamism that Ada doesn't. This is not true. Both are static (compiled) languages capable of dynamic polymorphism. I would suggest you reiterate the main advantages of Ada: that the Ada language nurtures the development of more reliable, maintainable, and reusable code than C, ObjC, C++, or Java; that, in general, code written in the Ada language is certain to be more portable than that written in C, ObjC, C++, or Java; that Ada's emphasis on well-defined interfaces between modules is particularly relevant to the Open Source ('bazaar') development process; Ada is purpose-designed as a systems programming language especially suited to the development of large software. Of course, I am myself (with others) writing an operating system in Ada. Unfortunately, this is a 'hobby' project, with no real source of funds, and will therefore inevitably be slow-running and small in scope. It would be wonderful for a project with the resources of a giant corporation (like Apple) behind it to opt for Ada in the development of an operating system. -- Nick Roberts Computer Consultant (UK) http://www.callnetuk.com/home/nickroberts http://www.adapower.com/lab/adaos