You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The go/types documentation twice mentions "incrementally":
Alternatively, create a new type checker with NewChecker and invoke it incrementally by calling Checker.Files.
NewChecker returns a new Checker instance for a given package. Package files may be added incrementally via checker.Files.
However, it's unclear to me what that's supposed to mean. The types tutorial doesn't mention "incrementally" at all either, or even describe using the types.Checker API.
Intuitively, I would think an "incremental" API means the caller only needs to supply new information; e.g., to call Files({A}) and then Files({B}). But looking at the implementation, it appears the second call actually needs to be Files({A,B}). That's fine (and can't change now anyway), but I'm not clear in what sense it's "incremental." It doesn't build on any previous work, except to reuse the same maps previously allocated.
The go/types documentation twice mentions "incrementally":
However, it's unclear to me what that's supposed to mean. The types tutorial doesn't mention "incrementally" at all either, or even describe using the types.Checker API.
Intuitively, I would think an "incremental" API means the caller only needs to supply new information; e.g., to call Files({A}) and then Files({B}). But looking at the implementation, it appears the second call actually needs to be Files({A,B}). That's fine (and can't change now anyway), but I'm not clear in what sense it's "incremental." It doesn't build on any previous work, except to reuse the same maps previously allocated.
/cc @griesemer @alandonovan
The text was updated successfully, but these errors were encountered: