3 ms·
This makes sense but it's more like general advice for why typical packages should not be import-dotted. I was talking about a very specific kind of low-polluti
by frou_dh 7y ago
This makes sense but it's more like general advice for why typical packages should not be import-dotted. I was talking about a very specific kind of low-pollution package that will export essentially nothing bar a single type (maybe a NewFoo constructor too). The package isn't a bucket, it's a barrier.
(I hope people move beyond ctrl-f/grepping, to tooling that has semantic understanding of definitions/references. Go go gopls & GoLand!)
- klodolph 7y agoIf you already have the answer, why are you asking the question? (You can’t find Foo just by looking at syntax at all, you would need to parse both the package where it is used and the package where it is defined. Using normal imports, you can get by with only parsing the call site.)