I am trying to understand the meaning of "evaluation".
I am learning about call by name and call by value in Scala and I am confused about what evaluation means. Is it something that compiler performs to understand my code or is it something like executing/verifying of a method before the actual call to the method ?
I couldn't find a clear explanation except for evaluation strategies.
Could you explain the evaluation for the following example ?
def callByValue(x : Unit) = {
for (i <- 0 until 5) {
print(x)
}
}
def callByName(x : => Unit) = {
for (i <- 0 until 5) {
print(x)
}
}