Should we change the search to breadth first? I often find that's what I intend vs. depth first.
Consider the following code:
class Foo {
constructor() {
initialize();
}
initialize() {
// stuff here
}
more() {
// ...
}
// ...
}
I find I always expect the query .Foo-.initialize to get from class Foo { down through the initialize() method, but instead I get the call within the constructor.
I'm not sure which is clearer - doing a breadth first or depth first. Depth first at least has a certain level of predictability because it reads roughly downward through lines of code.
Should we change the search to breadth first? I often find that's what I intend vs. depth first.
Consider the following code:
I find I always expect the query
.Foo-.initializeto get fromclass Foo {down through theinitialize()method, but instead I get the call within the constructor.I'm not sure which is clearer - doing a breadth first or depth first. Depth first at least has a certain level of predictability because it reads roughly downward through lines of code.