Describing what it is, is not:
Describing what it is, is not:
To program with functions that always return the same result for the same arguments (= pure functions).
fun square($x) { $x * $x }
To program with functions that always return the same result for the same arguments (= pure functions).
Which implies not to use side channels
our $x; sub set_x { $x= $_[0] } # has a side effect sub square { $x * $x } # exposed to the side effect
our $count=0; sub increment { $count++ } sub count { $count } |
# without side channels: fun increment($count) { $count + 1 } fun count($count) { $count } |
So, the question is, what is the motivation for such a style?
"Difficult to answer."
So, the question is, what is the motivation for such a style?
"Difficult to answer."
"It makes making proofs easier"
So, the question is, what is the motivation for such a style?
"Difficult to answer."
"It makes making proofs easier"
So, the question is, what is the motivation for such a style?
"Difficult to answer."
"It makes making proofs easier"
So, the question is, what is the motivation for such a style?
"Difficult to answer."
"It makes making proofs easier"
So, the question is, what is the motivation for such a style?
"Difficult to answer."
"It makes making proofs easier"
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
goto, or structured programming constructs, are for control flow
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
goto, or structured programming constructs, are for control flow
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
goto, or structured programming constructs, are for control flow
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
goto, or structured programming constructs, are for control flow
The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.
goto, or structured programming constructs, are for control flow
"Globals are evil"
is not difficult to explain
map { $_ * $_ } @x
It may look unusual, though.
Impure functions can read or write side effects in several ways
Notable: mutable data structures can be (unintended) side effect channels.
Side-effect free code and datastructures are complementing each other.