4 ms·
When teaching programming the concept of "local scope" seems hard to grasp for some people. The easy explanation is that a pronoun (usually) has a scope of a se
by daly 5y ago
When teaching programming the concept of "local scope" seems hard to grasp for some people. The easy explanation is that a pronoun (usually) has a scope of a sentence or a paragraph.
Just calling everything a "variable" seems imprecise.
- brezelgoring 5y ago>Just calling everything a "variable" seems imprecise. That's what they are, though, it is as precise as it needs to be. Why try to reinvent the wheel?
- jjice 5y agoCan't/shouldn't change an entire industry's vocabulary to help out some entry level programmers, who, if they took a little bit longer, would grasp the concept. If anything, this is placing more emphasis on people with a more formal grasp on language. As a layman, I never thought this hard about pronouns, just associated them with the most common ones and didn't think more about it. Local means close to, global means everywhere. Give a couple of code examples and I think we're cooking with gas.
- account-5 5y agoHonestly I understand the scope think a lot better. I still have no real mental model of what a pronoun is. Didn't even know what one was until my daughter mentioned the term during her first year in school
- qq4 5y agoProgramming is hard to grasp for some people. Local scope is the least of their worries and is altogether not that hard to understand. The County::State::City analogy where every item is a Place is an easy introduction to the concept.
- kleer001 5y agothen I could see this suggestion used informally in a teaching context with a student that has their dominant understanding in the structure of language, otherwise not so much