comp.lang.ada
 help / color / mirror / Atom feed
From: alby.gamper@gmail.com
Subject: Re: Ada-Win32 bindings
Date: Tue, 7 Aug 2018 02:45:36 -0700 (PDT)
Date: 2018-08-07T02:45:36-07:00	[thread overview]
Message-ID: <5c836355-2938-4cde-a03f-f7ee9f3ff2ee@googlegroups.com> (raw)
In-Reply-To: <pkah2p$umc$1@franka.jacob-sparre.dk>

On Tuesday, August 7, 2018 at 8:11:38 AM UTC+10, Randy Brukardt wrote:
> <alby.gamper@gmail.com> 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

  reply	other threads:[~2018-08-07  9:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04  0:20 Ann: Ada-Win32 bindings alby.gamper
2018-08-04  7:10 ` Dmitry A. Kazakov
2018-08-04  9:58   ` alby.gamper
2018-08-04 11:27     ` Dmitry A. Kazakov
2018-08-06 21:57 ` Randy Brukardt
2018-08-06 22:11 ` Randy Brukardt
2018-08-07  9:45   ` alby.gamper [this message]
2018-08-07 14:12     ` Dan'l Miller
2018-08-07 22:14       ` Randy Brukardt
2018-08-07 22:02     ` Randy Brukardt
2018-08-07 15:38 ` Ann: " Aurele Vitali
2018-08-09 12:00   ` alby.gamper
2018-08-09 13:38     ` Aurele Vitali
2018-08-09 21:46 ` Jere
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox