On Nov 18, 2019, at 13:14, Chris Angelico
I wasn't aiming that at you, so much as pointing out how incredibly tricky it is to pin down all these definitions. So tricky, in fact, that it's almost completely not worth trying to define at all (in my opinion).
90% of the time it’s obvious to everyone what the answer is, and maybe the other 10% of the time there just is no answer (at least not one that isn’t too arbitrary to be useful). So maybe a big pile of heuristics and/or machine learning is the answer. On the other hand, if that were a good idea, presumably Apple and/or Google would have done it for their pet languages. I’m not sure this distinction is something we need to color-code in the first place. There are plenty of things that are easier to nail down (like local vs. cell vs. global/builtin) that IDEs don’t bother to color-code. Why? I’m guessing it’s because if you throw hundreds of color distinctions at people they cease to distinguish anything. Do people really get subconsciously micro-confused or whatever by which things are functions vs. other variables/names/values/whatever in the first place?