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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to make Ada popular. Get rid of ";" at end of statement. Date: Fri, 26 Jul 2019 17:07:50 +0100 Organization: A noiseless patient Spider Message-ID: References: <5d9a8728-3c5b-4caf-b765-a455ba4d3523@googlegroups.com> <5fb45b9c-d7da-447c-999e-0e8bcce2eed5@googlegroups.com> <5467cebd-79c3-444c-b28d-a6a217bca0e5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="5c170a9efc4470b4fd7cbf678b15527e"; logging-data="18824"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8BpvqNATbvDzc/DhKmuFd430MLB9R6SM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:657fXhJUkM+ohHLTlbIMXEJDBKE= sha1:Z7wT6/axzs+LPhMAWcyVq0DvbMo= Xref: reader01.eternal-september.org comp.lang.ada:56957 Date: 2019-07-26T17:07:50+01:00 List-Id: Niklas Holsti writes: > On 19-07-26 13:54 , antispam@math.uni.wroc.pl wrote: >> Ingo M. wrote: >> So, less restrivtive target language is more convenient for >> generaator. > > I would be afraid that generating the less restrictve language could > hide and mask bugs in the generator. > >> Also, macros in target language simplify generator. Theoretically >> you may think that generator can do expansion. It can, but in >> practice macros in target language make difference. > > Of course there are any number of macro systems that could be used in > the generator Ada, although Ada has no macro system built in. But > again, I would be afraid that extensive use of macros in the generated > code would make it harder to review for generator errors, and could > also hide inefficient generated code. There's an unavoidable amount of complication involved in the mapping from model to executable code. In my experience[1] some of that ends up in the generator, and some in generics (not that far distant from macros, in this context) in the runtime support. In [1] generation is a complex process involving extraction from a model (UML) to a more amenable form, XSLT stylesheets, makefiles. There's a great deal of conditionality in the stylesheets; for example, the difference between a class whose instances are identified by a string (needs a map) and one whose instances are identified by an enumeration (needs an array). In hindsight, I'm not at all sure that using XSLT was the right long-term solution (it's not at all easy to reason about it). [1] https://github.com/simonjwright/coldframe