docs: minor fixes to main language reference page. #25903
+2
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. Normal comment - doc comment interleaving:
On
0.16.0-dev.1301+cbfa87cbe, the following definition produces the following docs:2. Error name change:
As a new Zig learner, one of the most unexpected things I encountered was that you could just define a global error set value by just going
error.AnyRandomNamewithout having to import anything (e.g.const error = @import("error");) or pre-declare it in any other place (const AnyRandomName = 123;).IMHO, such an early example in the reference page should not add an extra potential layer of confusion by making it clear that the error name does not need to be pre-imported and can be arbitrarily defined on the spot.
I'm open to a better name suggestion but it should IMHO not be any error name you'd expect to find in the stdlib.