From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:72d3:: with SMTP id o19mr3141270qtp.190.1598984524689; Tue, 01 Sep 2020 11:22:04 -0700 (PDT) X-Received: by 2002:a37:7d86:: with SMTP id y128mr3355573qkc.11.1598984524417; Tue, 01 Sep 2020 11:22:04 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 1 Sep 2020 11:22:04 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=76.77.182.20; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.77.182.20 References: <52baf1e5-f0a5-42be-acc7-75fb17fb6f4co@googlegroups.com> <5b2b3117-dd85-45ff-bbf6-0a1fa6364f76n@googlegroups.com> <2e77d5f6-3545-41e2-a378-2a98a8ed7cd6n@googlegroups.com> <7b0de654-32fa-4b78-88c9-8718f2dd2769n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <302f13a5-6652-408d-8fa9-65114963fc5en@googlegroups.com> Subject: Re: AdaCore's survey regarding the future of GNAT Community Edition From: Stephen Leake Injection-Date: Tue, 01 Sep 2020 18:22:04 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:59917 List-Id: On Monday, August 31, 2020 at 7:54:46 AM UTC-7, Vincent DIEMUNSCH wrote: > And they also used Python for libadalang : "libadalang is using the Langk= it framework as a basis, and is at the time of writing the main project dev= elopped using it. The language specification, while embedded in Python synt= ax, is mostly its own language, the Langkit DSL, that is used to specify th= e part of Ada syntax and semantics that are of interest to us."=20 >=20 > I wonder if it would have been possible to create a library of objects di= rectly in Ada, somehow equivalent in features to Python's Objects, but with= the advantage of strong typing and a compilation to native instructions. I= t would require a major use of interfaces, one for each Python's built-in t= ype class, but it would have been a foundation for many other applications.= =20 >=20 > Vincent Langkit uses the advanced features of Python to create a Domain Specific La= nguage (DSL) for defining Abstract Syntax Trees. The DSL also defines much = of the user API for accessing the syntax tree after parsing. You could acco= mplish something similar by using a grammar generator (WisiToken or Langkit= :) to create a parser for the desired DSL (as WisiToken does), but then de= fining the API would be done separately, and the correspondence between the= API and the syntax tree maintained manually (ie error-prone). I think Pyth= on is a good choice for this application - there are probably other languag= es with similar features that could have been used, but Ada is not one. -- Stephe