Possible Duplicate:
“eval” in Scala
Dr. Subramaniam in his presentation http://www.youtube.com/watch?v=LH75sJAR0hc at min 30 when he starts talking about functional style in Scala he gives this example
class Car {
def turn(direction: String) = {
println("turning " + direction)
}
}
val car = new car
car turn "left"
and then he says that the last line could be read from a data file and evaluated. So, data becomes code, code becomes data.
How does Scala supports this? Does it have an eval
function?