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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: pragma/aspect Import, Convention parameters Date: Fri, 14 Aug 2015 15:30:25 -0500 Organization: JSA Research & Innovation Message-ID: References: <1215a889y9uxf$.1nolkb1ctch79$.dlg@40tude.net> <1xhfjepw437zd.137i8eiplc5lt.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1439584227 23581 24.196.82.226 (14 Aug 2015 20:30:27 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 14 Aug 2015 20:30:27 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:27453 Date: 2015-08-14T15:30:25-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1xhfjepw437zd.137i8eiplc5lt.dlg@40tude.net... > On Thu, 13 Aug 2015 15:32:23 -0500, Randy Brukardt wrote: > >> "Dmitry A. Kazakov" wrote in message >> news:1215a889y9uxf$.1nolkb1ctch79$.dlg@40tude.net... >>> Why is it an identifier? >> >> Dunno. That's what Ada 95 defined, and we've never had a request to >> change >> it. > > Maybe now? It is not a big change and as much as I hate if-then-else > expressions they could be handy here. As always, send a description of the problem and proposed solution (not just the solution, 'cause that will just get put in the dusty drawer never to be seen again) to Ada-Comment and it most likely will get considered. >> In my experience (which is mostly with rather low-level stuff), there is >> a >> lot more different than just the convention when changing between Linux >> and >> Windows (subprogram names, parameter values, etc.) > > In these days most upper level libraries are more or less compatible > regarding their API. The main problem is actually names and conventions > because most of them have them build with Visual C for the Windows part > and > mimic Windows API, which are StdCall. That's of course the difference in our experience. I'd almost never use "upper-level libraries" for anything; I want as much code as possible that I can fix (which means it has to be Ada code at least nominally in our control). That's why Claw is the sort of binding that it is, directly to Win32. >> So it's not much of a >> hardship to use separate thin bindings for each -- the differences are >> reconciled in the thick binding anyway. > > Keeping two versions of *.ads is excessive and a hell of maintenance. > Independently of whether you have thick bindings or not, you have to have > thin bindings first. Right. It *is* a hell of a lot of maintenance -- that goes with the territory -- and no one wants to build tools that help. (Conventional version control is actively harmful in this, and the C "solution" of a preprocessor is a guaranteed trip to unmaintainable spagetti code.) Of course, it's possible that one *cannot* write a usable tool that would help (I wasn't able to solve the problem adequately for our own use, and I have tried). ... >> We side-stepped the problem for Claw by not supporting any other targets >> than Windows. :-) It would have been a lot worse had we wanted to support >> (say) GTK on Linux. > > Yes. > > However GTK is not a big problem because it has same external names under > Windows and Linux. For really few exceptions GTK's GIO had I used GCC > linker weak references to avoid contamination of *.ads files. There is no way we would have used GTK on Windows. The entire purpose of Claw was to give applications the Windows native look-and-feel. I've yet to see any GTK application that comes remotely close. A Linux version of Claw would have existed to emulate as much of that Windows look-and-feel as possible on Linux. I probably would have based it on GTK as X11 is a nightmare, but it would have been insane to run a program that *emulated* the Windows look-and-feel on Windows when a simple recompile/relink would have given one the actual look-and-feel. But I've actually been leaning toward the "portable" version of Claw being based in some way on HTML -- essentially what David Botton has been doing with Gnoga. (So it probably will never happen, as there doesn't seem like there would be any reason.) Randy.