Skip to content

change traverse search to breadth first? #25

@jashmenn

Description

@jashmenn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions