Skip to content
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

Missing sentence from documentation and language definition #113

Closed
gopherbot opened this issue Nov 12, 2009 · 3 comments
Closed

Missing sentence from documentation and language definition #113

gopherbot opened this issue Nov 12, 2009 · 3 comments

Comments

@gopherbot
Copy link
Contributor

by michael.jones:

The language definition for array types allows array of array to any depth 
and the array indexing operator [] works likewise. However this implication 
is never stated explicitly in the tutorial, overview, examples, FAQ, etc. Why 
not add a specific observation about it or an example like...

package main
import fmt "fmt"

func main() {
    var a1 [2] int;
    a1[1] = 1;
    fmt.Printf("1D array: %v\n\n", a1);

    var a2 [2][2] int;
    a2[1][1] = 2;
    fmt.Printf("2D array: %v\n\n", a2);

    var a3 [2][2][2] int;
    a3[1][1][1] = 3;
    fmt.Printf("3D array: %v\n\n", a3);
}

...somewhere to make the point plain. This is made all the more relevant by 
the hilbert.go test, with its goofy "at()" and "set()" functions,
which seem 
like they are hiding an underlying language disability with respect to 2D 
arrays.  Ahem... not to mention their reliance on assert()  ;-)
@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 1:

Owner changed to r...@golang.org.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 2:

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Nov 20, 2009

Comment 3:

This issue was closed by revision ff6a8fd.

Status changed to Fixed.

Merged into issue #-.

minux added a commit to minux/goios that referenced this issue Feb 27, 2015
minux added a commit to minux/goios that referenced this issue Feb 27, 2015
Update golang#113.

Conflicts:
	src/rt/asm_arm64.s
minux added a commit to minux/goios that referenced this issue Feb 27, 2015
Fixes some real bugs:
1. runtime.memeq and runtime.memclr both have off-by-one bug which skips
   the first byte,
2. reflect.callNN saved argument to wrong stack slot for ·callwritebarrier,
   There might be other instances of this bug because we translated Power64's
   R1 to SP, but that's actually not entirely correct (should use RSP).
3. mem{hash,equal}_varlen used the wrong closure environment register, and
   they also have bug in 2.
3. some functions used wrong date size/signedness for MOV.

Update golang#113.
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned robpike Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants