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!.POSTED!not-for-mail From: "Alejandro R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: "functional" programming in Ada Date: Wed, 7 Mar 2018 16:16:23 +0100 Organization: A noiseless patient Spider Message-ID: References: <896b83c6-83d4-4ffc-8c56-1481802ea8fd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 7 Mar 2018 15:16:23 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="2be4ab457d552c4d2afda3fc1fe39c2c"; logging-data="1140"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1yyx8vuYtfa4Vq8xobBEV" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:iTzcMudDdNEagdZVCk8HUN3D3qY= Xref: reader02.eternal-september.org comp.lang.ada:50879 Date: 2018-03-07T16:16:23+01:00 List-Id: On 07/03/18 16:03, Alejandro R. Mosteo wrote: > On 07/03/18 11:07, Maciej Sobczak wrote: >> 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 dropping of original values. >> If you write code in declarative parts (which also includes calling >> functions and using complex expressions to initialize variables at the >> point of declaration), then Ada might as well abandon the whole >> concept of dividing the code into declarative and imperative parts. If >> you can implement your whole system in the declarative part, then this >> division does not make sense any longer. > > That's an interesting point. I'm not sure the declare - begin part is > that critical, since scopes are defined between begin - end anyway > (which is frustrating for exceptions sometimes, when you want to ensure > a subprogram won't raise from its declarative part). I when to write some code and quickly realized why the declare-begin is so handy for proper scoping ;)