You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Can anyone give me some insight as to the design decision behind why you can't create a struct literal with direct references to embedded struct members?
It feels (naively) to me like the second example there really ought to work.
Thanks!
-josh
Rob Pike
unread,
Jun 20, 2013, 2:32:54 PM6/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Josh Bleecher Snyder, golang-nuts
It might one day, but as it stands the requirement to provide more
information is more robust against changes in the data types.
-rob
Josh Bleecher Snyder
unread,
Jun 20, 2013, 4:36:28 PM6/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rob Pike, golang-nuts
Makes sense. Thanks!
-josh
Kevin Gillette
unread,
Jun 20, 2013, 7:21:36 PM6/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Also note you can save a bit of redundant code by using type inference -- the main function code was modified in http://play.golang.org/p/SmeeROkVaa to demonstrate this.