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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5e:d50f:: with SMTP id e15-v6mr2369028iom.38.1533635137168; Tue, 07 Aug 2018 02:45:37 -0700 (PDT) X-Received: by 2002:aca:c744:: with SMTP id x65-v6mr536073oif.2.1533635137011; Tue, 07 Aug 2018 02:45:37 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.69.MISMATCH!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g13-v6no365671itf.0!news-out.google.com!k71-v6ni728itk.0!nntp.google.com!g13-v6no365669itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 7 Aug 2018 02:45:36 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=101.164.108.182; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.164.108.182 References: <27b53953-36f2-4efe-b877-2e316b176d80@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5c836355-2938-4cde-a03f-f7ee9f3ff2ee@googlegroups.com> Subject: Re: Ada-Win32 bindings From: alby.gamper@gmail.com Injection-Date: Tue, 07 Aug 2018 09:45:37 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 5549 X-Received-Body-CRC: 1571111806 Xref: reader02.eternal-september.org comp.lang.ada:54081 Date: 2018-08-07T02:45:36-07:00 List-Id: On Tuesday, August 7, 2018 at 8:11:38 AM UTC+10, Randy Brukardt wrote: > 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. Hi Randy It was never intended to imply that their are no other Win32 bindings available Developers in the Win32 space (or use Win32) are mostly aware of the AdaCore bindings (very much outdated) and of course Claw. The "initial" release was intended to convey the fact that its the first release, and that upcoming additions/changes are to be expected (note the mention of Improvements in the original post as testaments to this) Apologies for causing misunderstandings That aside I welcomed your input and fully understand your viewpoint, but I don't believe a direct low-level binding is nearly useless. If anything at worst case it can form the base of thicker bindings or be used as a reference to the current SDK version, as the other currently available bindings all seem to be outdated and we all understand that the Win32 SDK/API will and has evolved over time With respect to your last comment/paragraph I get the impression that you think these bindings were NOT built by a tool? In fact they were, and the underlying technology behind it makes it feasible to implement some if not all of your and Dmitry's suggestions/points. My only concern with this (if fully implemented) would be the resulting size of the bindings blowing out from 100K lines of code to something much bigger (and the impact of usage from clients of the bindings) Again, thanks for your and Dmitry's input, and I would like more of the Ada community to the same and assist those with less Ada specific expertise, who are trying to make a contribution to make "Ada cross the Chasm" thru providing bindings like Win32, WinRT and software like Visual Studio integration. Alex