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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada-Win32 bindings Date: Mon, 6 Aug 2018 17:11:36 -0500 Organization: JSA Research & Innovation Message-ID: References: <27b53953-36f2-4efe-b877-2e316b176d80@googlegroups.com> Injection-Date: Mon, 6 Aug 2018 22:11:37 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="31436"; mail-complaints-to="news@jacob-sparre.dk" 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.7246 Xref: reader02.eternal-september.org comp.lang.ada:54072 Date: 2018-08-06T17:11:36-05:00 List-Id: wrote in message news:27b53953-36f2-4efe-b877-2e316b176d80@googlegroups.com... > Dear Ada community > > I am pleased to announce the initial release of ADA bindings for the Win32 > API It seems bizarre to anounce the "initial release" of something that's been available in various forms for more than 20 years. I realize it is the the "initial release" of your version of these, but the ways its put heere would imply to outsiders that none has existed before. I tried to get a project going to make a "standard" version of Win32 bindings in the middle 1990s. The problem with a direct translation is the difficulty in dealing with String and Boolean parameters, so I had suggested building MAWB (pronounced "mob") - Medium Ada Windows Binding. This was a rote translation of the Win32 functions with a number of improvements: (1) Ada naming and overloading rather than camel-case and hungarian names; (2) Use of procedures that raise exceptions rather than functions that simply return an error result; (3) Use of String parameters rather than LPCStr; (4) Use of Boolean parameters and results rather than Bool. There probably were a few other things. This didn't generate much excitement; I only got two other people to get involved at all. In the end, nothing much ever got created for Ada in general (we still ship a version of it as part of the Janus/Ada runtime, but that is substantially simplified because the Janus/Ada compiler does the parameter changes itself, as part of pragma Import). Eventually, we gave up on it and moved on to Claw, which is a much thicker binding with no attempt to copy anything of Win32. I find a direct low-level binding nearly useless, because one has to jump through such hoops to do anything with it. For Claw, we just bound the routines we needed them as we needed them, which has the advantage that they can use the types of the overlying thick binding where appropriate. Dmitry's suggestions seem to be pushing you to reinvent MAWB. It seems unlikely to me that it would be any more interesting now than then (although it may not matter if you could actually build a tool to create it -- that was judged to be way too expensive in the 1990s -- the effort to bind the entire core of Win32 was thought to be half of that of building such a tool). Randy.