7 ms·
> An important rule is missing here: variables should be named with their scope in mind True, but I have plenty of slides in my presentation without adding mor
by peter_hilton 11y ago
> An important rule is missing here: variables should be named with their scope in mind
True, but I have plenty of slides in my presentation without adding more :)
The 'small scope rule' is more of a situation when you can get away with names that are less good, because of the small scope. When I get into discussions about that, everyone agrees with each other, and it distracts from the issue of coming up with good names when the scope isn't tiny.
Also, 'i' for a loop control variable is a trick example: why aren't you using a language that loops over collections without using a loop index?
- ezy 11y agoIf you buy into the prose/code relationship, this is silly. It is like complaining about an author using prepositions.