-
Notifications
You must be signed in to change notification settings - Fork 562
docs(spec): clean up TODO markers and improve MiniSpec clarity #2476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,7 +120,7 @@ Some identifiers are [predeclared](#predeclared-identifiers). | |
|
|
||
| ### Keywords | ||
|
|
||
| The following keywords are reserved and may not be used as identifiers (TODO: some keywords are allowed as identifiers). | ||
| The following keywords are reserved and may not be used as identifiers. | ||
|
|
||
| ```go | ||
| break default func interface select | ||
|
|
@@ -456,7 +456,7 @@ TypeName = identifier | QualifiedIdent . | |
| TypeArgs = "[" TypeList [ "," ] "]" . | ||
| TypeList = Type { "," Type } . | ||
| TypeLit = ArrayType | StructType | PointerType | FunctionType | InterfaceType | | ||
| SliceType | MapType . // TODO: check this | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep this TODO. |
||
| SliceType | MapType . | ||
| ``` | ||
|
|
||
| The language [predeclares]() certain type names. Others are introduced with [type declarations](#type-declarations). _Composite types_—array, struct, pointer, function, interface, slice, map—may be constructed using type literals. | ||
|
|
@@ -2399,15 +2399,19 @@ func protect(g func()) { | |
| } | ||
| ``` | ||
|
|
||
| ### TODO | ||
| ### Additional built-in functions | ||
|
||
|
|
||
| The following additional built-in functions are provided for convenience: | ||
|
|
||
| ```go | ||
| printf | ||
| println | ||
| ... | ||
| print(args ...any) // prints arguments to standard output | ||
| printf(format string, args ...any) // prints formatted output | ||
| println(args ...any) // prints arguments with newline | ||
| echo(args ...any) // alias for println | ||
| ``` | ||
|
|
||
| These functions are primarily intended for quick debugging and simple output. For production code, consider using the `fmt` package for more robust formatting and output control. | ||
|
|
||
| ## Blocks | ||
|
|
||
| A _block_ is a possibly empty sequence of declarations and statements within matching brace brackets. | ||
|
|
@@ -2775,11 +2779,7 @@ import _ "lib/math" | |
|
|
||
| ### An example package | ||
|
|
||
| Here is a complete XGo package that implements XXX. | ||
|
|
||
| ```go | ||
| TODO | ||
| ``` | ||
| > **Note**: A complete example package demonstrating XGo package structure and features will be added here. | ||
|
||
|
|
||
| ## Program initialization and execution | ||
|
|
||
|
|
@@ -2794,8 +2794,6 @@ var i int | |
| var i int = 0 | ||
| ``` | ||
|
|
||
| TODO | ||
|
|
||
| ### Package initialization | ||
|
|
||
| Within a package, package-level variable initialization proceeds stepwise, with each step selecting the variable earliest in `declaration order` which has no dependencies on uninitialized variables. | ||
|
|
@@ -2841,7 +2839,7 @@ the initialization order is `d`, `b`, `c`, `a`. Note that the order of subexpres | |
|
|
||
| Dependency analysis is performed per package; only references referring to variables, functions, and (non-interface) methods declared in the current package are considered. If other, hidden, data dependencies exists between variables, the initialization order between those variables is unspecified. | ||
|
|
||
| For instance, given the declarations (TODO: use classfile instead of method) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep this TODO. |
||
| For instance, given the declarations | ||
|
|
||
| ```go | ||
| var x = I(T{}).ab() // x has an undetected, hidden dependency on a and b | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this TODO.