3 ms·
As others have said, it is often helpful just to have a general idea of what things can be done so one can know where to look to find it. E.g. it might be “I kn
by dan-robertson 8y ago
As others have said, it is often helpful just to have a general idea of what things can be done so one can know where to look to find it. E.g. it might be “I know a library/tool related to this problem, let me find it’s manual and guess some keywords to search”, or even just “this feels like something for a lesser used unix tool, let me do info coreutils and look around.”
For programming languages, the thing I find particularly helpful is a formal grammar as it typically resolves any syntax related issues (and often these are subtle issues where two terms look similar written but one may be more restrictive than the other). The other thing I try to do is build a mental model of the compiler: If one has a good idea of what sort of thing one’s code might be compiled to, it is more obvious what constructs should and should not be allowed. This can backfire slightly: if one has an idea that eg Javascript will be compiled to fast code, it is obvious that the with construct should not be allowed, but maybe that just implies that the construct makes code slow.
I think this can help to understand eg why virtual methods are slower to call or why overloading works the way it does in an oo language, or eg why only certain subtyping operations should be around (in particular one way to decide this is “this language has certain typing rules and those demand certain constraints” Another is “this language wants to compile this construct to a certain thing and that requires that certain obvious constraints must follow”