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-Thread: 103376,c32fe290813aec20 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!l1g2000hsa.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: New Ada portable GUI Library? Date: Tue, 15 Jan 2008 06:01:24 -0800 (PST) Organization: http://groups.google.com Message-ID: <4744d0de-5739-4e6c-a338-a8f95217be14@l1g2000hsa.googlegroups.com> References: <6d63c543-0a35-4c39-a330-98c63a24f64d@i3g2000hsf.googlegroups.com> <478c6c2d$1@news.post.ch> <478c8d4a$1@news.post.ch> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1200405688 30894 127.0.0.1 (15 Jan 2008 14:01:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 15 Jan 2008 14:01:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l1g2000hsa.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19415 Date: 2008-01-15T06:01:24-08:00 List-Id: Martin Krischik wrote: > Ludovic Brenta schrieb: > > > Martin Krischik wrote: > > >> I have another suggestion: A GUI Library based on OpenStep [1]. > > [...] > >> [1] http://en.wikipedia.org/wiki/OpenStep > > > > Do you mean a reimplementation of the OpenStep specification in Ada, > > or an Ada binding to GNUstep (http://www.gnustep.org) ? > > The later. AFAIK GNUStep uses only a small message based dynamically > typed API with a plain C specification. Qt and Gtk+ use huge OO API's in > C++ or some kind of strange OO-C. > > To make use of that API easier special languages like Objective-C and > Objective-C++ are used. Those languages can be implemented by a > preprocessor (currently they are not) so I believe creating an > Objective-Ada preprocessor should be possible - especially since Ada > does not use '[' ']' and '@' ;-). An "Objective-Ada" preprocessor is unnecessary because Ada is already object-oriented, and now even has interfaces similar to Objective-C's protocols. Therefore, one would only need a binding generator that would produce Ada specifications with pragma Import statements from Objective-C specifications. Of course, such a binding generator would have to know how the particular Objective-C compiler mangles names. The stumbling blocks would be to implement Objective-C's reflection, dynamic typing and garbage collection in Ada. In particular, reflection and dynamic typing are alien to Ada's philosophy. > We would not be the first: Google-ing shows that Objective-TCL [1], > Objective-Perl [2] already exists and Objective-Cobol and > Objective-Fortran are rumoured [3] - even talk about Objective-Ada isn't > new [3]. That was before Ada 95 added tagged types. > The advantage is that once we have an preprocessor the hole library > becomes available. That's unlike Gtk or Qt where we have to write a > separate binding for each class we want to use and where - forever - we > will be hobbling behind. I don't think the preprocessor you speak of would solve anything; the binding generator might but beware of the stumbling blocks I mentioned. > > The latter > > would require both the Ada and Objective-C runtime libraries... > > Indeed - but that is not different from Gtk+ and Qt approach. And bare > metal is only feasible for Windows but not for X11. OK, Qt requires a C++ runtime like GNUstep requires an Objective-C runtime. However, GTK+ only requires the C runtime and that's intentional: one of the design goals of GTK+ from the onset is to facilitate bindings to other languages. -- Ludovic Brenta.