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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: protobuff for Ada Date: Mon, 31 Dec 2018 18:59:35 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <177bddd8-297e-4c5f-85aa-31cd694e68b4@googlegroups.com> <71d4373a-d8f7-448e-90cf-ea700c783030@googlegroups.com> NNTP-Posting-Host: i065DRYuysvTI4qVnaNkyg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader01.eternal-september.org comp.lang.ada:55143 Date: 2018-12-31T18:59:35+01:00 List-Id: On 2018-12-31 17:55, Olivier Henley wrote: > Interesting. I do not grasp the problem in full though... > > When you say "Sorry to disappoint you in this festive time", do you mean trying a solution from ASN.1 or only trying at Protobuff? Both. They are useless, up to harmful. > I think I get why a Protobuff could not cover "complete" transfer of Ada types around, but how does other languages do? (Almost everyone has it) Some of these languages have relatively "complex" type system..? The very concept of a data definition/description language (DDL) is wrong as I tried to explain. It has a very long and sad history in process automation, control, communication (e.g. CORBA), databases (e.g. SQL). Almost everybody and everyone tried it and failed. There are countless protocol describing "languages" around in process automation. I fought with them for decades, wrote several compilers for this mess. One could save huge amount of money and time if there were a law to punish people introducing this stuff... (:-)) > How do they achieve it? They express any complex types with a limited subset of primitive types(string, int32, etc)? You cannot express a type in a DDL. Data /= Type. Type = data + operations. If you want to express complex typed objects you lose before you start with a DDL. You throw all type semantics overboard. *If* you are OK without semantics then there is no need to introduce this mess. Use Ada stream attributes and simply read and write what you want and how you want. It is clean, easy, fast and 100% Ada. > Can you give a more pragmatic example that exemplifies the limitations in Ada? Any limitations Ada might have are unrelated to the issue of language impedance: DDL vs Ada unless you make DDL embedded like embedded SQL, which does not work either. I believe AdaCore has a product of the sort. Though I don't think that would be much better, but I would rather trust them than anybody else... Happy New Year! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de