Transcript from the "Principles Review" Lesson
>> Will Sentance: Unfortunately my slides are less, man. That thing there it says functional programming. That's meant to be like a grand bold statement on a new slide but instead it's like a little thing on the bottom. So let's imagine we're just looking at this functional programming. Here we go.
[00:00:37] How do I start calling a function?
>> Speaker 2: With parentheses.
>> Will Sentance: Parentheses, there it is. What does calling a function create everyone, together? It creates a brand new?
>> Speaker 3: [INAUDIBLE]
>> Will Sentance: It creates a brand new execution context. This is, believe me, this is everything. Is so powerful like this.
[00:00:57] Whenever I start calling a function, I get to create a new execution context. So how do I call a function, Lindsay?
>> Speaker 2: Parentheses.
>> Will Sentance: Parenthesis and when I call a function I create a new?
>> Speaker 3: Execution context.
>> Will Sentance: Exactly, smart room, a new execution context where we just have exactly what we do when we always run code.
[00:01:14] We have our memory, and thread but now we do it inside the function. When we start doing the code number line inside the function and our memory inside the function. What we're doing now, multiple execution context, all at the same time, but they're all around. So how do we keep track of them, cuz we're only ever in one at a time, so we gotta know which one of you're back to, etc.
[00:03:13] But for our purposes, again that comes back to that question, going deep, going under the hood of the language, is not for theoretical purposes. It's not for our intellectual curiosity, we do it because it makes debugging, writing clean code, and communicating what we're really doing much, much more possible.
[00:03:35] But that also means we have to hit a level we go, hold on, do I need to understand how this is turned into bi-code. Well, no I don't because it doesn't have any implications for how I write my code, it doesn't help me write cleaner or more efficient code.