zig icon indicating copy to clipboard operation
zig copied to clipboard

Documenation: Zig Language Reference uses the term "container" without defining it

Open rganesan opened this issue 3 years ago • 1 comments

Zig Version

0.10

Steps to Reproduce and Observed Behavior

This is not an issue with autodoc but an actual documentation issue, so I'm reporting this as a bug. Apologies if this was the wrong choice. Can you add a "Documentation" category to report issues like this?

Anyway, the issue is that Zig Language Reference uses the term "container" without defining it (for example: "Container Level Variables". I assume this means the scope of a block of code within braces but I've not seen the term used that way before in other languages.

Expected Behavior

Define what "container" means in Zig Context or just use the term "scope" which is well understood.

rganesan avatar Nov 05 '22 06:11 rganesan

I assume this means the scope of a block of code within braces

Not quite. A container is something that can contain members (fields, variants) and declarations (consts/vars/functions). It's both a namespace and a type that can be instantiated. So: a file, struct, enum, union, or opaque.

I thought it was a grammar detail, but if it's also documentation lingo then it would be helpful to define.

hryx avatar Nov 05 '22 07:11 hryx