Understanding std paths in Zig: how to tell package vs module vs types vs values vs aliases vs other items?

Yes, I should have used the word “easy”, not “obvious” - indeed, it’s quite deterministic, which is great, and if you call those 5 bullet points “easy”, sure. But I agree, with an LSP it’s easy, and the documentation links make it easy to SEE the code, if that’s all you need. So… I’m a happy camper. Just thought I’d concur with the frustration that a.b.c.d is not all directory names until you get to d. :slight_smile:

I think you’re misunderstanding the complaint. We’re not saying we want to understand everything and it’s difficult. We’re saying that trying to understand one part forces you into trying to understand everything, and that’s not practical.

thank you for clarifying it with examples; your explanation finally made it all make sense.

A simple way to determine this is: if . comes after a type, it is a namespace access; if . comes after a value, accessing the value (including a function pointer) is field access, and accessing a function, it is a special method access syntactic sugar. If the LSP can correctly display the distinction between types and values, this should not be difficult to distinguish.