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 X-Received: by 2002:a02:5c01:: with SMTP id q1-v6mr10636822jab.31.1533651153383; Tue, 07 Aug 2018 07:12:33 -0700 (PDT) X-Received: by 2002:aca:f495:: with SMTP id s143-v6mr548914oih.7.1533651153213; Tue, 07 Aug 2018 07:12:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!g13-v6no582917itf.0!news-out.google.com!k71-v6ni987itk.0!nntp.google.com!g24-v6no675877iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 7 Aug 2018 07:12:32 -0700 (PDT) In-Reply-To: <5c836355-2938-4cde-a03f-f7ee9f3ff2ee@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <27b53953-36f2-4efe-b877-2e316b176d80@googlegroups.com> <5c836355-2938-4cde-a03f-f7ee9f3ff2ee@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2d07e544-8e98-458c-894c-cdd898f29440@googlegroups.com> Subject: Re: Ada-Win32 bindings From: "Dan'l Miller" Injection-Date: Tue, 07 Aug 2018 14:12:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54083 Date: 2018-08-07T07:12:32-07:00 List-Id: On Tuesday, August 7, 2018 at 4:45:38 AM UTC-5, Alex Gamper wrote: > On Tuesday, August 7, 2018 at 8:11:38 AM UTC+10, Randy Brukardt wrote: > > Alex Gamper wrote in message=20 > > 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=20 > > > API > >=20 > > It seems bizarre to anounce the "initial release" of something that's b= een=20 > > available in various forms for more than 20 years. I realize it is the = the=20 > > "initial release" of your version of these, but the ways its put heere = would=20 > > imply to outsiders that none has existed before. > >=20 > > I tried to get a project going to make a "standard" version of Win32=20 > > bindings in the middle 1990s. The problem with a direct translation is = the=20 > > difficulty in dealing with String and Boolean parameters, so I had sugg= ested=20 > > building MAWB (pronounced "mob") - Medium Ada Windows Binding. This was= a=20 > > rote translation of the Win32 functions with a number of improvements: > > (1) Ada naming and overloading rather than camel-case and hungarian nam= es; > > (2) Use of procedures that raise exceptions rather than functions that= =20 > > 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. > >=20 > > This didn't generate much excitement; I only got two other people to ge= t=20 > > involved at all. In the end, nothing much ever got created for Ada in= =20 > > general (we still ship a version of it as part of the Janus/Ada runtime= , but=20 > > that is substantially simplified because the Janus/Ada compiler does th= e=20 > > parameter changes itself, as part of pragma Import). > >=20 > > Eventually, we gave up on it and moved on to Claw, which is a much thic= ker=20 > > binding with no attempt to copy anything of Win32. > >=20 > > I find a direct low-level binding nearly useless, because one has to ju= mp=20 > > through such hoops to do anything with it. For Claw, we just bound the= =20 > > routines we needed them as we needed them, which has the advantage that= they=20 > > can use the types of the overlying thick binding where appropriate. > >=20 > > Dmitry's suggestions seem to be pushing you to reinvent MAWB. It seems= =20 > > unlikely to me that it would be any more interesting now than then (alt= hough=20 > > it may not matter if you could actually build a tool to create it -- th= at=20 > > was judged to be way too expensive in the 1990s -- the effort to bind t= he=20 > > entire core of Win32 was thought to be half of that of building such a= =20 > > tool). > >=20 > > Randy. >=20 > Hi Randy >=20 > It was never intended to imply that their are no other Win32 bindings ava= ilable > Developers in the Win32 space (or use Win32) are mostly aware of the AdaC= ore > bindings (very much outdated) and of course Claw. The "initial" release w= as > 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 misunderstandi= ngs >=20 > 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 wors= t 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 out= dated > and we all understand that the Win32 SDK/API will and has evolved over ti= me >=20 > 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 under= lying > technology behind it makes it feasible to implement some if not all of yo= ur > and Dmitry's suggestions/points. My only concern with this (if fully impl= emented) > would be the resulting size of the bindings blowing out from 100K lines o= f code > to something much bigger (and the impact of usage from clients of the bin= dings) >=20 > Again, thanks for your and Dmitry's input, and I would like more of the A= da > 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 prov= iding > bindings like Win32, WinRT and software like Visual Studio integration. >=20 > Alex Alex, do what =E2=80=A2you=E2=80=A2 think is best. I am a strong believer = in multiple competing alternatives, producing a Darwinian survival-of-the-f= ittest outcome. (And by that I mean survival of the fittest ideas/designs = within a library/framework/code-generator, not the brandname itself nor the= deployed package itself nor the vendor itself.) For example, what is best= for a handcrafted UI/UX library/framework might be completely different th= an what is best for a code-generated UI/UX library/framework. Permissive l= icensing versus viral licensing alone might be a major survival-of-the-fitt= est differentiator. I once worked for a company that always intentionally started 2 or 3 compet= ing-but-different products (or different designs for substantially the near= ly-the-same product). About 2 years into the product, they would kill off = all but the strongest single one, promote the victors' engineers, and merge= in the killed-off product's engineers into not-seniormost positions in the= victor. It was a beautiful meritocracy to behold.