Re: [Haskell-cafe] Theoretical question: are side effects necessary?

On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
... but the question of purity of a program - in my opinion - concerns the program, and nothing else.
You might be thinking of software engineering purity.
The networking is not expected to break the referential transparency, or does it?
Jerzy Karczmarczuk
What does referential transparency mean to you? -- -- Regards, KC

Quoth KC
On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
wrote: ... but the question of purity of a program - in my opinion - concerns the program, and nothing else.
You might be thinking of software engineering purity.
Or software engineers might be thinking of purity in the same way. I personally hope I think of purity in a way that's of some practical use in terms of Haskell programs, and I would hope software engineers in general would do likewise. From that perspective, it seems to me that M. Karczmarczuk is on pretty solid ground. Donn

Apparently on such solid ground that you hinder their critical thinking
skills by answering for them.
On Fri, Mar 16, 2012 at 9:24 PM, Donn Cave
Quoth KC
, On Fri, Mar 16, 2012 at 7:44 PM, Jerzy Karczmarczuk
wrote: ... but the question of purity of a program - in my opinion - concerns the program, and nothing else.
You might be thinking of software engineering purity.
Or software engineers might be thinking of purity in the same way. I personally hope I think of purity in a way that's of some practical use in terms of Haskell programs, and I would hope software engineers in general would do likewise. From that perspective, it seems to me that M. Karczmarczuk is on pretty solid ground.
Donn
-- -- Regards, KC

KC comments the posting of Donn Cave referring to the soundness of some potential approach of software engineers:
Apparently on such solid ground that you hinder their critical thinking skills by answering for them
Monsieur KC, do you want to discuss, or just to be cute? In both cases, begin by signing your posts. I will not discuss with an anonymous, and concerning your question about referential transparency, I permit myself to send you to some standard literature. Over. == Chris Smith: When we're talking about different uses of the word "function" in programming languages, side effects refer to any effect other than evaluating to some result when applied to some argument. For example, in languages like C, printf takes some arguments, and returns an int. When viewed as just a function, that's all there is to it; functions exist to take arguments and produce return values. But C extends the definition of a function to include additional effects, like making "Hello world" appear on a nearby computer screen. ... And here I disagree. If printf, or whatever explodes an atomic bomb, this is not a "side effect". If a procedure executes such a statement: "x = x+1", or "a[1]=a[2]", it IS. And even that, not always ! In Clean, which is as pure as Haskell, there are "unique access" variables, and it is possible to write (+/-...) # myFile = write myFile "Hello World" And the point is that WHATEVER happens to the outer world, and the computer file system in particular, there are no side effects within the program. The "#" construction is a "temporal", sequential part of a purely functional expression, exactly as a monadic chain in Haskell, disguised as a do block. There are two "distinct" file objects, the "previous", and the "next" one, which happen to share the same name, because *the type system* prevents that a computing block refers to both. Either the old, or the new. This is my philosophy. If somebody disagrees, that's alright. Jerzy Karczmarczuk
participants (3)
-
Donn Cave
-
Jerzy Karczmarczuk
-
KC