3 ms·
I think you hit on what I've felt about learning Python then trying to learn c++. In python, all code paths are "statically discoverable". Meaning if a symbol
by Waterluvian 8y ago
I think you hit on what I've felt about learning Python then trying to learn c++.
In python, all code paths are "statically discoverable". Meaning if a symbol exists in a file, I can find where that symbol comes from in that file. And if it's an import, the import tells me where to look for it in another library or relative path.
In c++ when I was trying to learn it was a lot of, "okay so why is 'foo' available here?" "Because it's imported by the 'bar' library that you're importing at the top of the header."
- beagle3 8y ago> In python, all code paths are "statically discoverable". That's not exactly true. modules can monkey-patch themselves and other modules; they can override the import mechanism to do all sorts of things. It's usually considered bad form, but .. it's possible, and some people like it that way.
- Waterluvian 8y agoYes you're right. But in the first five years of learning I've never run into that conventionally. Where I have, it was made painfully obvious by comments. Practically speaking, when it comes to learning by reading code, it's invaluable.