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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.241.1 with SMTP id c1mr13913890iti.15.1520417280413; Wed, 07 Mar 2018 02:08:00 -0800 (PST) X-Received: by 10.157.22.195 with SMTP id s3mr1149602ots.13.1520417280283; Wed, 07 Mar 2018 02:08:00 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e10no239925itf.0!news-out.google.com!a25ni562itj.0!nntp.google.com!r195no82161itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 7 Mar 2018 02:07:59 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.9.244.24; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 194.9.244.24 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <896b83c6-83d4-4ffc-8c56-1481802ea8fd@googlegroups.com> Subject: Re: "functional" programming in Ada From: Maciej Sobczak Injection-Date: Wed, 07 Mar 2018 10:08:00 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2795 X-Received-Body-CRC: 3529876818 Xref: reader02.eternal-september.org comp.lang.ada:50872 Date: 2018-03-07T02:07:59-08:00 List-Id: On Tuesday, March 6, 2018 at 12:34:32 PM UTC+1, Alejandro R. Mosteo wrote: > I'm writing more code in declarative parts. It is interesting how language evolution leads to mixing of ideas or even d= ropping of original values. If you write code in declarative parts (which also includes calling functio= ns and using complex expressions to initialize variables at the point of de= claration), then Ada might as well abandon the whole concept of dividing th= e code into declarative and imperative parts. If you can implement your who= le system in the declarative part, then this division does not make sense a= ny longer. The argument about tools using these expressions (in contracts, for example= ) is interesting as well, because tools also benefit from simpler grammar a= nd strict code structure. Apparently there is no single formula for a perfe= ct language! My (current[*]) own preference is to avoid mixing programming styles in a s= ingle language and instead mix languages in a single system. In addition to= forcing me to put more thought into the design, it also makes language pur= ists happy. :-) If you find it funny to write in functional style, why not = compose your system from parts written in Ada with parts written in [put yo= ur *other* favorite language here]? Why abuse a single language to do what = it was not originally supposed to do? [*] Disclaimer: current preferences become obsolete with time. I reserve fu= ll rights to change my mind in the next post. --=20 Maciej Sobczak * http://www.inspirel.com