comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: "functional" programming in Ada
Date: Wed, 7 Mar 2018 02:07:59 -0800 (PST)
Date: 2018-03-07T02:07:59-08:00	[thread overview]
Message-ID: <896b83c6-83d4-4ffc-8c56-1481802ea8fd@googlegroups.com> (raw)
In-Reply-To: <p7luc6$fu7$1@dont-email.me>

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.

The argument about tools using these expressions (in contracts, for example) is interesting as well, because tools also benefit from simpler grammar and strict code structure. Apparently there is no single formula for a perfect language!

My (current[*]) own preference is to avoid mixing programming styles in a single 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 purists 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 your *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 full rights to change my mind in the next post.

-- 
Maciej Sobczak * http://www.inspirel.com


  parent reply	other threads:[~2018-03-07 10:07 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 11:34 "functional" programming in Ada Alejandro R. Mosteo
2018-03-06 13:09 ` Dmitry A. Kazakov
2018-03-06 14:35   ` Alejandro R. Mosteo
2018-03-06 15:08     ` Dmitry A. Kazakov
2018-03-06 16:00       ` Manuel Collado
2018-03-06 16:37         ` Dmitry A. Kazakov
2018-03-06 22:16           ` Manuel Collado
2018-03-07  8:41             ` Dmitry A. Kazakov
2018-03-07  4:46         ` Paul Rubin
2018-03-06 13:29 ` Mehdi Saada
2018-03-06 14:34   ` Alejandro R. Mosteo
2018-03-06 14:36     ` Mehdi Saada
2018-03-06 15:27       ` Alejandro R. Mosteo
2018-03-06 16:26       ` Jeffrey R. Carter
2018-03-06 20:17       ` Randy Brukardt
2018-03-07 14:30         ` Alejandro R. Mosteo
2018-03-06 15:01 ` Dan'l Miller
2018-03-06 15:25   ` Alejandro R. Mosteo
2018-03-07 10:07 ` Maciej Sobczak [this message]
2018-03-07 10:52   ` Mehdi Saada
2018-03-07 13:11     ` Pascal Obry
2018-03-07 13:53       ` Dmitry A. Kazakov
2018-03-07 16:13       ` Dan'l Miller
2018-03-12  0:13         ` Robert I. Eachus
2018-03-08  3:34       ` Randy Brukardt
2018-03-08  8:23         ` Dmitry A. Kazakov
2018-03-08 22:49           ` G. B.
2018-03-09  8:38             ` Dmitry A. Kazakov
2018-03-09  8:40           ` Simon Wright
2018-03-09 13:39             ` Dmitry A. Kazakov
2018-03-07 15:03   ` Alejandro R. Mosteo
2018-03-07 15:16     ` Alejandro R. Mosteo
2018-03-07 20:34     ` Robert A Duff
2018-03-07 22:47     ` Jeffrey R. Carter
2018-03-08  0:26     ` Shark8
2018-03-08  0:45     ` Paul Rubin
2018-03-08 11:07       ` Alejandro R. Mosteo
2018-03-08 18:24 ` G. B.
2018-03-09 14:41   ` Alejandro R. Mosteo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox