comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Haskell, anyone?
Date: Tue, 17 Nov 2015 21:09:29 +0100
Date: 2015-11-17T21:09:29+01:00	[thread overview]
Message-ID: <1nlttj5hrclzm$.1o16db3zb8trv$.dlg@40tude.net> (raw)
In-Reply-To: 87fv05q9e1.fsf@ixod.org

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


  reply	other threads:[~2015-11-17 20:09 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-15 20:42 Haskell, anyone? mockturtle
2015-11-15 20:51 ` Paul Rubin
2015-11-15 20:53 ` Nasser M. Abbasi
2015-11-15 21:50 ` Mark Carroll
2015-11-15 22:11 ` mockturtle
2015-11-15 22:48   ` Nasser M. Abbasi
2015-11-15 23:05     ` Mark Carroll
2015-11-16  4:11       ` Paul Rubin
2015-11-16  5:17         ` Nasser M. Abbasi
2015-11-16  5:48           ` Paul Rubin
2015-11-16  5:59             ` Nasser M. Abbasi
2015-11-16  6:47               ` Paul Rubin
2015-11-16  8:45           ` Simon Wright
2015-11-16 14:38             ` Brian Drummond
2015-11-15 23:19     ` Jeffrey R. Carter
2015-11-16  9:36       ` J-P. Rosen
2015-11-16 18:14         ` Jeffrey R. Carter
2015-11-16  3:59   ` Paul Rubin
2015-11-16  8:33   ` Dmitry A. Kazakov
2015-11-16  9:33     ` mockturtle
2015-11-16  9:45       ` Paul Rubin
2015-11-16 10:25 ` Hadrien Grasland
2015-11-16 11:19   ` Simon Wright
2015-11-16 11:25     ` Hadrien Grasland
2015-11-16 13:59   ` G.B.
2015-11-16 20:24   ` Jeffrey R. Carter
2015-11-16 23:23   ` Paul Rubin
2015-11-17  8:26     ` Dmitry A. Kazakov
2015-11-17  9:10       ` Mark Carroll
2015-11-17 20:09         ` Dmitry A. Kazakov [this message]
2015-11-17 10:49     ` Hadrien Grasland
2015-11-17 12:01       ` G.B.
2015-11-17 16:43         ` Hadrien Grasland
2015-11-17 18:04           ` Paul Rubin
2015-11-17 21:42             ` Hadrien Grasland
2015-11-18  4:36               ` Paul Rubin
2015-11-18  8:48                 ` Hadrien Grasland
2015-11-18  9:23                   ` Paul Rubin
2015-11-18 10:44                     ` Hadrien Grasland
2015-11-18 11:02                       ` Dmitry A. Kazakov
2015-11-18 12:41                         ` G.B.
2015-11-18 23:06                       ` Randy Brukardt
2015-11-19  8:56                         ` Hadrien Grasland
2015-11-19  9:19                           ` Hadrien Grasland
2015-11-19 21:27                           ` Randy Brukardt
2015-11-24 12:03                           ` Jacob Sparre Andersen
2015-11-19  7:22                       ` Paul Rubin
2015-11-19  9:39                         ` Hadrien Grasland
2015-11-17 13:01       ` Thomas Løcke
2015-11-17 16:45         ` Hadrien Grasland
2015-11-18  0:11       ` Paul Rubin
2015-11-18  9:44         ` Hadrien Grasland
2015-12-06 12:59   ` David Thompson
2015-12-07  7:25     ` Hadrien Grasland
replies disabled

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