Roger, At the 16:00 min mark, you discuss the lexical vs the dynamic scoping. With the exemple you are giving, when I calculate the function "f", I get 34. for an answer. This implies that the first instance of "y" is "à la C" a global variable while the "y" inside f(x) is a local variable that overwritews the global one inside the function. But in g(x) the "y" is calling the global variable. Is my understanding correct? Thanks
@sumrak22able
8 жыл бұрын
y is not a free variable in f(), its a local variable !! y is free variable only in g()!!
@Abhishek-fe3zs
2 жыл бұрын
Thanks Roger. You explain this very well. One thing tho is that Y is not a free variable but a local variable in f. Also can I please get your official email? I am considering applying to Johns Hopkins for a master's in Artifical intelligence or some other subset of CS. I watched one of your other videos and you said you are in the faculty. I was hoping you could help me a bit.
Пікірлер: 4