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!news.eternal-september.org!.POSTED!not-for-mail From: Ivan Levashev Newsgroups: comp.lang.ada Subject: JEDI, Win32Ada and GNAT-COM Date: Sun, 18 Jun 2017 09:03:45 +0700 Organization: A noiseless patient Spider Message-ID: References: <7d1796c7-3492-4f19-ac6c-27c70e486d59@googlegroups.com> <1496935894.11747.0.camel@obry.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 18 Jun 2017 02:02:52 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9b101877d0a44da92488f407d3b635ef"; logging-data="3212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19w9el4hwGHQt5euKcBlQCfr/fIYT8DXW4=" User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <1496935894.11747.0.camel@obry.net> Cancel-Lock: sha1:agu99+fA1BjU7JhN5eAcPegpFyc= Xref: news.eternal-september.org comp.lang.ada:46972 Date: 2017-06-18T09:03:45+07:00 List-Id: 08.06.2017 22:31, Pascal Obry пишет: > > Here: > https://github.com/AdaCore/win32ada > If anybody is interested (in terms of funding), I can think about reviving JEDI to Ada converter. https://bitbucket.org/OCTAGRAM/winapi-delphi-to-ada/src/4e966fc13369c6b5d482df9983be97415aaee6dd/Icon-Win32API/Win32API_out/Jwa.Win_Con.ads?at=default&fileviewer=file-view-default JEDI has WinAPI bindings for Delphi, and Delphi is similar to Ada in some sense. I.e. in C we have int* parameter, and it can mean "in out Integer", "out Integer", "anonymous access to array of Integer" or "library-wide access all Integer", that is, the pointer going to be stored for future. Delphi also has out and "in out" ("var") arguments support, so this can be translated freely. When Delphi developers write WinAPI bindings for Delphi, they interpret what they deal with, and thus bindings become more rich, more convenient to work with compared to bindings produced from Platform SDK C headers. They sometimes make overloaded versions of the same functions because some API have different ways of use, e.g. some parameter can be null or non-null determining meaning of other parameters, and JEDI bindings has one version where null pointer can be passed, and another one has "in out" ("var") parameter in the same place. JEDI is being actively used, so these interpretations proved to be useful for some real developers already. Win32Ada seems to have been produced with neither accounting Delphi developers' work nor repeating the same work independently and is comparably less soulful, less convenient. The same goes to GNAT-COM. In Delphi interface references were using ARC long before it appeared in Objective-C. It's very unlikely to do something wrong while working with them. Wherever exception is raised, there won't be COM objects leaked due to missed IUnknown.Release call. Ada is better than Delphi, so I expected GNAT-COM to naturally provide at least the same level of confidence, but instead I was very surprised to meet unsafe naked references crying from every corner to be leaked on any unpredicted exception, and recall, Ada doesn't have try-finally, so there is no convenient way to handle them other than by using Controlled. Delphi and Ada developers being apart is a curse haunting both languages for so many years. Both ecosystems lost from unawareness of each other. WinRT stands on top of WinAPI and COM, so implementing WinRT support in Ada brings us back to old unsolved problems. Best Regards, Ivan Levashev, Barnaul -- If you want to get to the top, you have to start at the bottom