The free variables that can be used come from the enclosing scope and are ‘closed over’ when used in the function.
they don’t cause the kinds of error-at-a-distance problems that inferring named function types can
When I read the chapter of the closure.
What’s the meaning of ‘free variables’?
What’s the meaning of
" are ‘closed over’ when used in the function?"
What’s the meaning of ‘error-at-a-distance’?
Someone can give some examples?
By the way, I feel that Rust has a lot of tools, but lacks guiding ideology (e.g. In python, Everything is object, So all the features, all the tools, all the mechanisms are in a unified model, which is very helpful to understand, to learn, to use. that’s elegant.).
It has features about procedure programming, OOP, functional programming, but if i adopt OOP, i would found Java is more convenient and productive. What would it be like ?
So what attracts you to this language, just it’s safety?
thanks for help.