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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Haskell, anyone? Date: Tue, 17 Nov 2015 21:09:29 +0100 Organization: cbb software GmbH Message-ID: <1nlttj5hrclzm$.1o16db3zb8trv$.dlg@40tude.net> References: <14533506-4289-4148-b8c4-e970f5778b26@googlegroups.com> <87si45msuz.fsf@nightsong.com> <1h61j5twxf2t2.1dm6v8iu2cpdi$.dlg@40tude.net> <87fv05q9e1.fsf@ixod.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: j6IQVb9uobzjXrpQLDU2rQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:28423 Date: 2015-11-17T21:09:29+01:00 List-Id: On Tue, 17 Nov 2015 09:10:14 +0000, Mark Carroll wrote: > On 17 Nov 2015, Dmitry A. Kazakov wrote: > >> On Mon, 16 Nov 2015 15:23:16 -0800, Paul Rubin wrote: >> >> Because declarative programming is non-algorithmic and no programming at >> all, if taken seriously. It is like the idea of stateless programming, just >> a fiction. > > I do generally find it > possible to translate algorithms from books like CLR(S) -- longest > common subsequence or directed graph maximum flow or whatever -- to > being purely declarative, it just means that I have to step back and > really understand the idea and approach of the algorithm, rather than > just mechanically translating their for loops and arrays and whatever > into the appropriate syntax. I don't think that is declarative. Imperative means that you have some computational model and express the solution in terms of basic operations of that model. Whether that be loops or recursive functions is not much matter, except that former are much easier to understand, test, validate, prove correctness, estimate numerical complexity, optimize etc. A declarative approach is inherently non-constructive. You don't try to understand anything, you just state something and let the inference system to deduce the solution without understanding how it works. Without even knowing what must be stated. Reverse problems are much harder than direct ones, as we know from mathematics. That is why FP is so much try and error rather than focused design. This a consequence of being declarative. Same problems have other declarative approaches, e.g. relational algebra, modeling languages etc. Once you try to see what is going behind the scenes, it is no more declarative. "Let there be light" is declarative. Physics of electromagnetic fields is imperative. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de