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

cmd/cgo: Inconsistent field names for data structure members #5647

Closed
gopherbot opened this issue Jun 6, 2013 · 1 comment

Comments

@gopherbot
Copy link

commented Jun 6, 2013

by TheBrokenToaster:

Which compiler are you using (5g, 6g, 8g, gccgo)?
    6g


Which operating system are you using?
    Linux Mint 14 Nadia


Which version are you using?  (run 'go version')
    go version go1.1 linux/amd64


Please provide any additional information below.
    The fix given in issue #3741 created a new data structure for GoSlice, but the naming conventions used for that is different than what is used for GoString and GoInterface.

I would be cleaner and more predictable if the member names were consistent across the
three defined data structures:
    typedef struct { char *data; int len; } GoString;
    typedef struct { void *type; void *value; } GoInterface;
    typedef struct { void *data; int len; int cap; } GoSlice;
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2013

Comment 1:

OK, that would have been a good idea, but since those names are used in user code I
think it's too late now.

Status changed to Unfortunate.

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.