purity
  Home FAQ Contact Sign in
Search only in:
perl.cpan.testers
 
Advanced search
MATCHING GROUPS



more...
Group Profile...
POPULAR GROUPS

more...

found 1412 articles for 0.005 sec
5-06 Purity -- A Critique     

Author: David E. Milligan
Date: Feb 17, 2008 11:58

5-06 Purity First airing was Nov. 9, 1999. The episode starts with Xena, Gabrielle... gives her a pep talk. She tells her the purity of compassion is what they need to defeat Pao.... able to acquire the Book's powers from her purity of evil, and she explodes some rocks. Joxer and.... A 7.5 out of 10. ^^^^^^^^^^^^^^^^^^^^^^ 50-6 Purity ...... 7.5 5-05 Them Bones ... 8.5...
Show full article (8.20Kb)
Re: More on Function Purity     

Author: David Hopwood
Date: Jun 1, 2007 18:42

Donn Cave wrote: Dirk Thierbach <dthierbach@usenet.arcornews.de> wrote: Purity expresses the ability to reason about a piece of code like a black box, just looking at the result it delivers for some given arguments. There's no hidden state to consider, neither in some global variables, nor in operating system, nor on some harddisk, nor does it depend on when and where you ...
Show full article (1.76Kb)
Re: More on Function Purity     

Author: Dirk Thierbach
Date: Jun 1, 2007 04:58

...Menger <quetzalcotl@consultant.com> wrote: On 1 Jun., 11:01, Dirk Thierbach <dthierb...@usenet.arcornews.de> wrote: Ingo Menger <quetzalc...@consultant.com> wrote: The concept of purity is interesting for the compiler (because it allows more transformations), and for the programmer reasoning about his program (because it simplifies this reasoning). I see the point for ...
Show full article (1.06Kb)
Re: More on Function Purity     

Author: Tony Finch
Date: Jun 1, 2007 04:14

Dirk Thierbach <dthierbach@usenet.arcornews.de> wrote: The point of purity is that it allows you to reason about the program using the program itself (i.e., the source code with all modules, or however you'd define it) alone. If a function is pure, you can safely replace it with anything that respects the same argument/result relationship. Also, you can move it around, delay it's ...
Show full article (1.20Kb)
Re: More on Function Purity     

Author: Ingo Menger
Date: Jun 1, 2007 01:52

...the command line (or anything else from "outside") as ana rgument does indeed not violate purity. Ok. Hence, [getArgs] it's not pure, as is everything else that depends on something ...getArgs operates on a list provided by the runtime system at program startup. So, your concept of purity is meaningless, since there are cases where it's violation is not posibly observable.
Show full article (0.79Kb)
Re: More on Function Purity     

Author: Ville Oikarinen
Date: Jun 1, 2007 01:07

... don't change between invocations, then the whole program is just a big constant. And there is no point in publishing such a program: just publish its result (unless the result is bigger than the program that generates it). So while you _can_ define purity like that, what practical use does such a definition have? Most functions depend on values given at call-time. - Ville Oikarinen
Show full article (0.93Kb)
Re: More on Function Purity     

Author: Dirk Thierbach
Date: May 31, 2007 23:06

...the values read/input don't change during one execution of the program. But they can possibly change between different executions of the program, and that's what makes them impure. The test for purity is, very simply: Can I replace the expression in question with a "black box" that just reflects the argument/result relationship, and will the program behave exactly the same? For a variant ...
Show full article (1.94Kb)
Re: More on Function Purity     

Author: Donn Cave
Date: May 31, 2007 10:01

In article <20070531125441.1072.2.NOFFLE@dthierbach.news.arcor.de>, Dirk Thierbach <dthierbach@usenet.arcornews.de> wrote: The point of purity is that it allows you to reason about the program using the program itself (i.e., the source code with all modules, or however you'd define it) alone. If a function is pure, you can safely replace it with anything that respects the same ...
Show full article (1.18Kb)
Re: More on Function Purity     

Author: Dirk Thierbach
Date: May 31, 2007 05:54

...to show that passing the command line to main does not violate purity. But changing main so it does take the command line (or anything else from "outside") as ana rgument does indeed not violate purity. I have said so twice now. And there's no need to ...as long as this is done before main is evaluated. The point of purity is that it allows you to reason about the program using the ...
Show full article (1.86Kb)
Re: More on Function Purity     

Author: Ingo Menger
Date: May 31, 2007 01:42

...then I am out of it. Sorry, but I feel Donn's example is legitimate. One could contrive the example one step further to show that passing the command line to main does not violate purity. For this, we imagine what could be done if the Haskell runtime did not include an IO action that accessed the comand line. In this case one could write Main.hs like so: module Main where import ...
Show full article (1.35Kb)
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next