Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What's it called

Name: Anonymous 2011-01-10 10:24

Is there a term for a type of program that is guaranteed to always produce the same output?  For example, it never accepts keyboard input, never reads a timer, etc, so it must always follow the same execution path.

The only term that comes to mind is "deterministic" but that's not quite right.

Name: Darkr 2011-01-10 18:32

It's called purity.  A pure function is one which will always produce the same output given a particular input.  Any function which isn't pure is said to have side effects.  Purely functional languages such as Haskell try to be as pure as possible.  It's obviously not possible for everything, but the idea is to limit the side effects to only where it's necessary.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List